(navigation image)
Home American Libraries | Canadian Libraries | Universal Library | Community Texts | Project Gutenberg | Children's Library | Biodiversity Heritage Library | Additional Collections
Search: Advanced Search
Anonymous User (login or join us)
Upload
See other formats

Full text of "Compute! Magazine Issue 010"

A 6502 Version Of 
The Winter Consumer 
Electronics Show 



The 6502 Resource Magazine 



Clearing Apple It's 
Low- Resolution 



PET • Apple • Atari • OSI • KIM • SYM • AIM Graphics Screen 



COMPUTE! 

The Journal For Progressive Computing 



$2.50 

March, 
1981 

Issue 10 
Vol. a No. 3 



Designing Your 
Own Atari 
Character Set 



Machine 
Language 
Taking 
The Plunge 



Keyprint 
(For The Pet) 
Revisited 



Six-Gun 

Shootout Game 
For The OSI C1P 



ll7A470"63379" 



D 3 








rR 



II 
■■ 

r ■ 

in 

9s 



I 



il tTi : " S! 
II ail H 

r ■ 

r r 

em 4ir 



J.i. 

r: e t 
r.c 1 

I - c i 



"r*- 



p ■ 



at 



i^'^Ny^^.: 



S 5 El 



Mountain Computer 

can now 

EXPAND 

Your Apple II Peripheral Capacity 

EXPANSION CHASSIS 



Quality You Expect 

Eight more slots for your Apple! Now you 
can bank-select eight more peripheral slots 
with immediate or deferred software 
commands— like having upto 15 peripheral 
cards "on line"— or use the Select/Deselect 
switch mounted on the front panel. 
Expansion Chassis' heavy-duty power 
supply is primarily for peripherals, without 
the heavy demand of motherboard support 
chips required in your Apple. This means 
much more power is available for peri- 
pherals than in your Apple itself! If you've 
run out of room in your Apple — Expansion 
Chassis isyouranswer. Drop by your Apple 
dealer for a demonstration, or contact 
Mountain Computer for the location of 
the dealer nearest you. 



Performance You Demand 

• Eight mirror image I/O slots of the Apple 

• Fully buffered, bi-directional data lines 

• Apple II compatible interface card 

• Dual selection capability; hardware or 
software 

• Immediate or deferred selection in 
software mode 

• From BASIC, a single POKE command 
turns the chassis ON or OFF 

• Compatible withal software 

• Dedicated powers jpply with 
approved power transformer 



0^ Mountaiin Computer 

(Si^_: I NCOBPORATKD* 

300 Harvey West Blvd., Santa Cruz, CA 95060 
(408) 429-8600 TWX 910 598-4504 

























■ 




■ 




(MUSE 

POWEr 






Mountain Cc 

INCOBPOSA 


»mputer 

TIO 










1 


■ 



March. 1981. Issue lO. 



COMPUTE! 



IF YOU'RE WAITING FOR THE 

PRICE OF WORD PROCESSORS 

TO FALL WITHIN REASON, 




l^gggi 





Everyone expected it would happen 
sooner or later. . .with WordPro PLUS" 
it already has! Now all the marvelous 
benefits of expensive and advanced 
word processing systems are available 
on Commodore computers, America's 
largest selling computer line. WordPro 
PLUS, when combined with the new 80 
column CBM 8032, creates a word pro- 
cessing system comparable to virtually 
any other top quality word processor 
available — but at savings of thousands 
of dollars! 



New, low cost computer technology is 
now available at a fraction of what you 
would expect to pay. This technology 
allowed Commodore to introduce the 
new and revolutionary CBM 8032 
Computer. 

WordPro PLUS turns this new CBM 
8032 Computer into a sophisticated, 
lime saving word processing tool. With 
WordPro PLUS, documents are dis- 
played on the computer's screen. Edit- 
ing and last minute revisions are simple 
and easy. No more lengthy re-typtng 
sessions. Letters and documents are 
easily re-called from memory storage 
for editing or printing with final drafts 
printed perfectly at over five hundred 
words per minute! 



Our nationwide team of professional 
dealers will show you how your office 
will benefit by using WordPro PLUS. At 
a price far less than you realize. 



invest in your office's future. . . 
Invest in WordPro PLUS. . , 
Call us today tor the name of Ifie 
WordPro PLUS dealer nearest you. 

Professional Software Inc. 

166 Crescent Road 
Needham, MA 02194 
(617)444-5224 
TELEX; 95 1579 






Memory —you never seem to have quite 
enough of it. 

But if you're one of the thousands of Apple 
owners using the SoftCard, there's an economical 
new way to expand your memory dramatically. 

16K0NAPIUG-INCARD. 

Microsoft's new RAMCard simply ^ 
plugs into your Apple 11,® and adds 16k 
bytes of dependable, buffered 
read/write storage. 

Together with the SoftCard, 
the RAMCard gives you a 56k 
CP/M® system that's big enough 
to take on all kinds of chores that 
would never fit before (until now, g 
the only way to get this much 
memory was to have an Apple f 
Language Card installed). 'j- 

GREAT SOFTWARE: 
YOURS,OURS,OR THEIRS. | 

With the RAMCard and 
SoftCard, you can tackle large- 
scale business and scientific 
computing with our COBOL and « 
FORTRAN languages. Or greatly 
increase the capability of CP/M | 



II 



applications like the Peachtree Software account- 
ing systems. VisiCalc™ and other Apple software 
packages can take advantage of RAMCard too. 

And RAMCard gives you the extra capacity to 
develop advanced programs of your own, using the 
SoftCard and CP/M. Even with the RAMCard in 
place, you can still access your ROM BASIC 
and monitor routines, 

^ JOIN THE SOFTCARD 

FAMILY. 

The RAMCard Is just the 
latest addition to the SoftCard 
I family —a comprehensive sys- 
tem of hardware and software 
I that can make your Apple more 
versatile and powerful than you 
ever imagined. 

Your Microsoft dealer has all 
the exciting details. Visit him 
soon, and discover a great idea 
that keeps getting better. 

Microsoft Consumer 
Products, 400 108th Ave. N.E., 
Suite 200, Bellevue, WA 98004. 
■^ (206)454-1315. 





f^^ ' ^ 






SBfiiSjg^^ 


♦_^^-Tl* 


'"': ;-#^':i. 




i j^^^ 




y^i 


1: : ].''.K 


: ;-sFri= 



/Hicn^psc^ 



Morch, 1931. Issue 10, 



COMPUTE! 



Table of Contents 



March, 1981, Vol. 3. No. 3 



The Editor's Notes Robert Lock, 4 

A Beginner's Guide to Compute! 9 

A 6502 Version of ttie Winter Consumer 

Eiectronics Show: January '81 David Tlnornburg, lO 

The Beginner's Page Robert Locl<, 12 

Computers end Society David Thornburg, 14 

Taking the Plunge-Machine Language 

Programming for Beginners Richard Mansfield, 20 

Computer Communications Experiments Marvin L. DeJong, 28 

Basics of Light Pen Operation Robert A. Peck, 36 

Getting the Most from your Pet Cassette Deck , . . Louis F, Sor^der, 42 
The Mysterious and Unpredictable 

RND-Part 3 Bob Albrecht and George Fired rake, 48 

A CAI Program Called Linear Equation Peter Ookes, 54 

Hex Conversion Using the 6502's Decimai Mode Jack Clarke, 60 

The Apple Gazette 62 

Clearing the Apple II Low-Resolution 

Graphics Screen Sherm Ostrowsky, 62 

Fun with Apple and PASCAL Gene A Mouney, 68 

Flipping your Disk Ivl, G. Sieg, 71 

The Atari Gazette 72 

Designing Your Own Atari Character Sets Craig Ratchet!, 72 

Atari Basic: A Line Renumbering Utility D, IVI, Gropper, 78 

Atari Memory Dump and Dlsassembier Robert W, Bal<er, 8C 

Formatted Output for Atari Basic Joseph J. Wrobel, 84 

Random Color Switching while idle R, A Howeli, 85 

The OSI Gazette 87 

A Small Operating System: OS65D the Kernel Tom R. Berger, 87 

A Six-Gun Shootout Game for the OSI CIP ... Charles L, Stanford, 88 

The PIT Gazette 92 

Keyprint Revisited Eric Brandon, 92 

Learning About Garbage Collection Jim Butterf ieid, 96 

PET Machine Language Graphics David IVIalmberg, 102 

Disk File Recovery Program David L. Cone, 112 

PET Exec Hello Gordon Campbell, 124 

A Flexible input Subroutine Glenn M. Kieiman, 130 

Universal Tope Append for PET/CBM Roy Busdiecker, 132 

The SBC Gazette 138 

Nuts and Volts Gene Zumchck, 138 

Experimenting with the 6551 ACIA Marvin L DaJong, 142 

A Vocal Hex Dump for the KIM-1 WiliiomC. Clements, Jr., 146 

Expanding KIM Style 6502 Single Board Computers 

-Part 3 of 3 Hal Chomberlin, 150 

Cassette I/O with AIM-65 BASIC Michael Rathbun, 152 

New Products 154 

CAPUTEi Robert Lock and Authors, 164 

Writing for COMPUTE! 166 

Advertisers Index 168 



^^^-^^r^ 




^ 



i/iiLdC^^^^ 



ffurtu. 




^ .fr' 




tfU/ 



^^<S 





k 



0- 



^ 



¥ 



ifj^ 



r-j 



AUTHORS 

• PI 



COMPUTE! The Journal for Progressive Computing (USPS: 537250) is published 12 times each year by Small 
System Services, Inc., P.O. Box 5406, Greensboro, NC 27403 USA. Phone: (919) 275-9809. Editorial Ofiices are 
located at 200 East Bessemer Ave., Greensboro, NC 27401. 

Domestic Subscriptions: 12 issues, J20.00. Send subscription orders or change of address (P.O. Form 3579) to 
Circulation Dept., COMPUTE! Magazine, P.O. Box 5406, Greensboro, NC 27403, Controlled circulation postage 
paid at Greensboro, NC 27403. Application to mail ai controlled circulation rates pending at Hickory, NC 28601. 
Entire contents copyright © 1981 by Small System Services, Inc. All rights reserved. ISSN 0194-357X. 




I ^MPjngiri 



COMPUTE! 



March, 1981. Issue 10. 




Robert Lock, 
Editor/Publisher 

Software Copying Revisited, 
Or Who's Paying The Bills? 

We recently received an extensive letter from a 
Canadian subscriber commenting on the January 
editorial regarding software piracy. I'd like to 
respond to one specific point of the letter now, and 
request other readers to respond at length as well. 
Let's get the dialogue rolling, and we'll continue it 
from here. I really think it's a critical turning point 
in the industry's future development. I don't 
presume to suggest we can solve it here, but I'd like 
COMPUTE! readers to help spark and maintain the 
dialogue. Here's the prompting remark from the 
reader; 

/ agree to a great deal with your comment on copyright 
of magazines and books and software. I disliked your 
generalizations about schools. Schools are rather like big 
businesses. If a business has a number of machines and 
purchases say a "General Package", is it really break- 
ing copyright to make enough copies to be used on all its 
machines? I don't think so. I reckon schools are in a 
similar situation. . . 
First of all, your comment presumes that big 
business has the right to copy (reproduce) proprietary 
software. They don't have the right to do so any 
more than Commodore (for example) would have the 
right to buy one copy of a program and give it away 
with all of their computers. Frequently, "big 
business" is able to buy a piece of software with 
limited license rights, they pay additional fees. This 
is not the case with the software we're talking about 
for our marketplace. I'd like to propose an analogy... 
suggested by an individual involved in software sales. 
He commented on a "textbook defense" of software 
theft, and I'll expand on it here: 

Let's assume that you've taken your notes and 
teaching experiments from the last few years, and 
spent a recent summer developing them into a 
textbook, complete with student workbook full of 
exercises. 

You find a publisher, obtain a contract wherein 
you receive a royalty on sales, go through numerous 
editings, and finally see your first copy in the mail. 

Your book is selling for $19.95, and you're 
looking forward to some return from your royalties. 

Time Passes 

Sales are going along okay, but not up to your ex- 
pectations. I mean it is an excellent book. You attend 
a regional educational conference, and run into Dr. 
So and So from a neighboring school district. He 



says, "We really enjoyed your new text, and it's 
super! We're using it in all of our classes next year." 

Great (you think). Hundreds of sales. "Oh, by 
the way," he continues. "We thought $19.95 was 
pretty expensive, so we only bought one copy. We're 
running off class copies in our own print shop. . .See 
you later." 

There goes your work, and your royalty. I 
assume you're concerned, if not angry. Is this any 
different in principle, from the defense of schools and 
software copying. Now we all know that realistically, 
the book would be rather expensive to duplicate. And 
I presume no one would doubt the illegality of the 
act. The essence of the argument would seem to 
become one of ease and expense of the copying. Soft- 
ware comes on an inexpensive, easily transportable 
media. Therefore, does copying it suddenly become 
okay? We need to give thought as well to the pro- 
ducers of the work. With commercial software, 
there's someone out there, after some amount of 
hard work, patiently waiting for their royalty. 

I would suggest that users should not define a 
$19,95 software purchase as an unlimited right to 
copy, just as they wouldn't consider doing the same 
with a $19.95 textbook. 

It would be more appropriate to approach pro- 
ducers about school licensing agreements, or multiple 
copies at school discount through their vendors, or 
whatever. This rational (negotiated) approach, if you 
will, would solve problems for several parties. . . 
Schools who currently buy multiple copies of soft- 
ware would save money, schools (individuals) who 
currently buy and reproduce would have full vendor 
support, and so on. The vendor support is an ele- 
ment we haven't touched on, but is part of the whole 
problem. I've been told, essentially, "Why should I 
support the educational market? They just steal my 
stuff." 

A Post-Script 

These comments should in no way infer that most- 
schools aren't absolutely honest in their software pur- 
chases. We're just using this initial analogy to get the 
ball rolling. We've heard recently of a major in- 
dustrial research center on the West Coast that's 
using approximately 80 copies of a $150.00 plus soft- 
ware package . . . copies cloned from their original 
single copy purchase. And how many times have you 
picked up that "back-up" copy of Cursor magazine 
to use just this once? 

Defining The Right Of Bacic-up 

Several other magazines in the industry have recently 
been running advertisements for a program that 
copies (duplicates) protected software for a particular 



ATARI: PERSONAL 

COMPUTER SYSTEMS THAT 

GROW WITH YOU 




Start with a better computer. 

Atari computers have built-in capa- 
bilities you can't even add onto 
many other personal computers. 
Three programming formats (ROM 
cartridge, disk and cassette), A 57 key 
upper/lower case ASCII keyboard with 
39 keystroke graphics symbols. 128 
colors and hues. Four separate sound 
channels and a built-in speaker. Four 
controller ports. A built-in RF 

©1980. Alan, Inc. 

O A Warner Communications Company 

Atari reserves Ihe righ! to make charges to products 
or programs wilhool notice. 



modulator and FCC approval for 
connection to any TV Plus, nationwide 
Atari Authorized Service Centers. 
And more. 

Add memory. The ATARI 

800^" is supplied with 
16K of memory. You can 
expand up to a full 48K of 
RAM with 8K or 16K Memory 
Modules"" you install yourself. 
In less than a minute. The 
ATARI 400's" 8K of RAM may be 
expanded to 16K at Authorized Ser- 
vice Centers. Both may be expanded 
to 26K of ROM with slip-in ROM 
cartridge programs. 

Add peripherals. The ATARI 410"' 
audio-digital program recorder Sin- 
gle or dual density* disk drives. The 
ATARI Soo individually addresses up 
to four drives. Add the ATARI 850™ 
RS232 Interface Module, Add high 
speed 40 or 8o-column printers. Add 
an acoustic modem for remote data 
access. Add a light pen.* And there 
are more Atari peripherals 
on the way. 



■■I 3' 

A- 

ATARI 



Add programs. Choose among doz- 
ens of programs in Atari's rapidly 
expanding software library. Programs 
categories include: 

• Personal Finance 
& Record Keeping 

• Personal Interest & Development 

• Professional Applications 

• Education 

• Information & Communfcation 

• Entertainment 

• Programming Languages 

• Small Business Accounting 

Add it up. With Atari, you start 
with more. And you can build to 
more. Because Atari offers you per- 
sonal computer systems that grow 
with you. Ask your Atari retailer 
to give you a full demonstration 
of Atari computers, peripherals 
and programs. Complete systems. 
Because when other people were 
thinking hardvrare and software. 
Atari was thinking systems. 

"'Available FaH. 1980 



PERSOWAL COMPUTERS 

:;65 Bortegjs Avenue, Sunnyvale, CA 94086 

Cill loll tree iSaol ii>*547 (Except Abskj and Hawaii) 
\ln CaJrfornia: (Soo) 672-1,104) for the name oi your nearest Atafi retailer. 




13 AIARI 



W ws mf tar 



^ wm MRi 9mi- a ^- 




COMPUTEI 



March, 1981. Issue 10, 



Staff 

Robert C. Lock, Publisher/ Editor 
Kathleen Martinek, Publication 

Assistant 
Georgia Papadopouiis, Art Direction/ 

Production Assistance 
Joretto Klepfer, Manager, Dealer/ 

Distributor Marketing 
Carol Holmquist Lock, Circulation 

Manager 
Dai Rees, Shipping Department 
Charles Brannon, Software Lob 

Assistant 

Associate Editors 

Jim Butterfield, Toronto Canada 
Harvey Herman, Greensboro, NC 

Contributing Editors 

Robert Baker, 15 Windsor Drive, 

Atco, New Jersey 08004 
Gene Beals, 115 E. Stump Road, 

Montgomeryville, PA 18936 
Len Lindsay, 5501 Groveland 

Terrace, Madison, Wl 53716 
Craig Patchett, 2 Swan Terrace, 

Greenwich, CT 06830 

Subscription Information 

(12 Issue Year): 

COMPUTE! Circulation Dept. 

P.O. Box 5406 

Greensboro, NC 27403 USA 

U.S, $20.00 

Canada $25,00 {U,S, funds) 

Europe: Surface Subscription, $25,00 ("U.S. 

funds) if ordered direct, or avoilobie inlocol 

currency from ttie foiiowing distributors: 

United Kingdom 

Contact L. P. Enterprises, 

8-11 Cambridge House 

Cambridge Rood 

Barking, Essex 

Engiond IGl 18NT 

Germany, 

Switzeriand, 

Austria, 

Contact ing, W. Hofacker GMBH 

8 fvlunclien 75 

Postfach 437 

West Germany 
Canadian Retail Deaiers should contact: 
Micron Distributing 
409 Queen Street West 
Toronto, Ontario M5V 2A5 
(416) 361-0609 

Authors of manuscripts warrant ttiat all materials submitted to COMPUTEI are original materials with full owner- 
ship rights resident in said outhors. By submitting articles to COtvlPUTEl, authors acknowledge that such 
materials, upon acceptance for pubiicotion, become the exclusive property of Smoll System Services. Inc. No 
portion of this magazine may be reproduced in any form without written permission from the publisher. Entire 
contents copyright © 1980, Small System Services, Inc. Programs developed and submitted by authors remain 
their property, with the exception that COMPUTE, reserves the right to reprint the material, as originally 
published in COMPUTEI, in future publications. Unsoilcited materials not occepted tor publication in COMPUIfci 
will be returned if author provides a self-addressed, stamped envelope. Program listings should be provided in 
printed form (new ribbon) as weil as machine readable form. Articles should be furnished as typed copy (upper 
and lower cose, please) with double spacing, Eoch pane of your article should bear the title of the article, date 
and name of the author. COMPUTEI assumes no liabilitv for errors In articles or advertisements. Opinions 
expressed by authors are not necessarily those of COMPUTEI. 
PET Is a trademark of Commodore Business Machines, inc. 
Apple is a trademark of Apple Computer Company, 
ATARI is a trademark of Atari. Inc. 



Advertising Sales 

If you re in Oklahoma, Texas or the 
Western States, we're now represented 
by Jules E. Thompson, Inc. Give thiem a 
call for space reservations, contract/ 
insertion information, or questions, You 
can reachi thiem throughi the following of- 
fices: 

Southern California, 
Arizona, New Mexico 
Jules E. Thompson, Inc. 
2560 Vic Tejon 

Polos Verdes Estates, CA 90274 
213 378-8361 
Jo Ann Sullivan 
Northern California, 

Pacific Northwest, Rocky Mountoin States, 
Texas. Oklahoma 
Jules E. Thompson, Inc. 
1290 Howard Avenue, *r303 
Burlingame. CA 94010 
415 348-8222 

Phoebe Thompson 

If you're in the East, we're now 
represented by The Gittelman Com- 
pany. You con reach them through the 
following offices; 
New England, 
New York State 
The Gittelman Company 
Statler Office Building 
Suite 482 

20 Providence Street 
Boston, MA 02110 
617 451-0822 
Joan Donahue 
New York City Metro Area, 
Mid-Atlantic and Southeastern States: 
Local numbers: 
New York 212 567-6717 
Atlanta 404 523-1252 
The Gittelman Company 
Summit Office Centre 
7266 Summit Avenue 
Fort Washington, PA 19034 
215 646-5700 
Doug Johnson 



Address all advertising materials to: 
COMPUTE 

200 East Bessemer Avenue 
Greensboro, NC 27401 USA 

Mailing address: COMPUTEI 

Post Office Box 5406 
Greensboro, NC 27403 USA 

Telephone: (919) 275-9809 



Apple World 

3-D ANIt-'ATED COLOR GRAPHICS 
Wfitier in machine coae 
The program mide f«moui on nationiJ T.V.! 
by Pa^Jl Liilj5 

APPLE WORLO turns ycur A|>pi'p miD a sophisucaied 
graphics system capable ol Limi\\nQ arrnnated 
ihi-ee Cimcrisionai coloi images proiecimg mem m 
Irue perspecll^fe an me screen, rotate Ihgm. move 
Thpm closer , further away. ari3 mdny Dither gxCtting and 
imaginatLve mmgs 

Draws obiecis wiih 6S 000 pOiriis per side 

A powej-iuf screen-oriented te*! edilor is mcluded to 
, laciliiaie image fomatiori This program w^^ rr^rently 
leatuied on Tom Snyfler s Hnnve Time SatufOay TV 
ShoM and n now available for sale 

APPLEWORLDSpowerlulea lions so easy to use rfi^I 
cfiiidreriwill sovcit Voucan i^ow sketch 'yoyfdrearrr 
tnouse. boat, car, or fantasy i?mD[(e Then view it as it 
would Deseen from lO.OOOteeLoryoucani ZOOM ir 
until the screen is tilled with a doorknob You could 
Iherv go ms^dc and mnve from Foom to room 
t examining lumiiu'e placement as yatit screen rotates 
wilhm itie room Images or speciiic parts o( iinages 
CAfi «asily be saved to disk or pnnler 

Does all mjs sound like science fiction? 

u won tlfiinhsoatief younave viSiteo Apple World. 

INTRODUCTORY PRICE S59.95 
, For 46K Apple II or Plus with Disk 

^Snpergraphics 



M 
M 
¥ 

-K 



4 3D GAt/t DEVELOPMENT SYSTEM IM COLOR 
Df Paul Lulus 

Waicn colorful Diiltefllys Ciras. f^'i acfoss your Apple 
uf Aiari screen wntn true 3 Dnrnenssonal perspective 
Have rocKelSliipSlly Out a( ysj m tf.is mcrediDle Migti 
speeo graphics package 3-D SUPERGRAPHICS" is 
a 6502 machii^* language pfogram tnal will 
inlertace 10 yOur Basic or machine language 
programs or games usmg simple "DOS-lihe' commands, 

F««turei include: 

• Simple image entry mrougn eo<tQr 

• OPteds up to 25fi points p^r Side 

• Uses all fii-res colors 

• Allows mixed colored tejd & graphics 
lor promcts and caption? 

• Translates on 3 anes 
Individual axi^s scales 
?1 d'lfereni commanas 
Roiaie object i 4" to 360' 
inc'emenis at machine &pe«d^ 

FOR 4BK APPLE U OR PLUS WITH 
DISK II £39.95 FOR DISK 

FOR ATARI 800 WITH 40K MEMORY 
(DISK OPTIONAL) 

$39.95 FOR TAPE 



L^ OTHER SOFTWARE 

^^^ APPLE COMPUTERS 

Super Space Wais S 3 95 

L Slater fi Capitals ^95 

^^■^ Moving Point 

■^^^ Average 1995 

^ Stock Options. ... 24 95 

frnance -. - i£95 

fc Bonds 12 95 

^V^ COMMODORE PET 

r SiocK Options ..-- 24 95 

Finance 12 95 

k^ Bonds 12 95 

^^mf Stock Analyser 22 95 

^^^ Morlgage 14 95 

r Space NilrgflerS I'-Besi 

Game of 19?9'1 I9 95 

_^m^ Kentucky Oefby/ 

"^W|^ Roulette 9.95 

r Alien I Q .Tar^k 9.95 

Submarine Attack 9 95 

W^ Ballle ol Midway 7 95 

^^■^ Laser Tank Batlle 9 95 

"TPV Swarm 14 95 

r Baseball 9 95 

Super Siarirek u 95 

k PETMuSicBOJt 29 95 

^^■v Music Composition Si'slem 

"^■^ ..- 1995 

r Pearl Harbor Adventure ...... 

,.. 1495 

Super Gomoku 9 95 



March, 1961. Issue lO. 



COMPUTE! 



Relational Query System For Management 




DATABASES: YouVe Heard The Hype Before... 
The Truth IS... REQUEST DELIVERS! 



DATABASE MAINTENANCE — 

• Uses sophisticated screen formatting & Oata 
entry, like on IBM 3270's! 

• Generates its own screens automatically! 

• Handles records up to 4K in length, using 
multiple screen "Pages"! 

• Automatic data compression for increased 
disk capacity 

• Uses Superkram (See below) access metfiod 
for incredibly fast access, LESS THAN .2 
SECONDS FOR A RECORD! 

• Automatic index creation/maintenance 

• Automatic maintenance capabilities 

• "Goof-Proof" error fiandling 

• Input can come from VISICALC" or 

SOURCE- 



DATABASE SELECTION— 

• Uses screen masks to form query 

• Provides extensive search capabilities 

• Search arguments can include 
arithmetic/boolean functions, multi-field 
comparisons 

• Queries can generate input for automatic 
database maintenance 

• Queries can be stored in "Query Library" and 
executed from menu on demand 

• Any number of fields can be queried 
concurrently 

• Query output can be routed to disk. CRT 
report formatter. VISICALC" or SOURCE'" 

ONLY $225 



DATABASE REPORTING— 

• Automatic tieadlines 

• Automatic field editing 

• Report fields can be calculated, sub-iolaled & 
cross-footed in any manner desired. 

• Optional counter tjreaks may be set 

• Automatic grand totals 

• Automatic statistics 

REQUIREMENTS 

Superkram (see below) and: Commodore Pet 
32K (40 or 80 col) and 2040/4040/8050 disk OR 
Apple II 48K with Applesoft or language system 
and 2 disk drives or CORVUS. 



SUPERKRAM 



Now With Multi-Key 

Capabilities 

For Apple & Pet 



by K«n Germann 



Since KRAM"" was introduced inl 979 it has fast become known as the quickest 
and most powerful access method for serious Apple and Pet users. Now, after 
hundreds of requests we have added MULTI-KEY, MULTI-INDEX, functions, 
as well as increasing processing speed. 



tBM/370 usefs have VSAM (Virtual Siorage Access Meihodl lo 
provide fasi, flexible iiey«l-acces5 10 irifiirdata Nqm SUPER KRAM 
(Keyed Ranaom Acces? Method |. tjom UnDtedSoTlwsre of AmerHca. 
gives Apple ana Pet users the same riembiliTy. sutJBtanTiaNy 
increasing ihe processing power 0I me Apple and Per 

UntiJ SUPER KRAM %hv onry 'lamiom access ' capabiiiry in the 
Apple and Pel consisied of a crude lorm o' "relative record" 
processing While Ihis u usable tor very sirnpleapphcaipons. it t3\\$ 
lar snort oi the needs c( today s btjsmess and analytical 
applicalJons Using SUPER KRAM records may be processed Cy 
any one oi mulliple "Key " wafues. which may consist oi any kind ol 
data: rumbers. letters, special charaaers. etc Even Appless long- 
awaited DOS 3 3 doesn I have anyihing htie this!! 




KflAM'" 2,0 Only $99,95 
SUPER KRAM" Only S175 



KRAM" 2.0 ReguJar Features 

• Wdtien in 6502 machine ccxJe 
Basic cornpatibic 

• Cieate Open a daiasei 

• Put Fecord by hey 

• Ada A. delete records by key 

• Get any recoid by FuU.Pariiial hey 

• Acc«sby any key inaiiiitleas 5 sec [ 1 sec with Corvusdiih) 

• Suppofis mullipie cjisks 

• Read ncKl Of D'evious lecofd 

• Dynamic space allocation 

■ Dynamic space reclamation 

• Dynamic inees compression 

• Files rievLM need leoirganif ition 

• Compatible with l^r^guage syslerns 



ATTENTION-EXISTIMG KRAM USERS , 

SenQ Si5 wjth original disk and ROM lo Uniied Software lor jmprovecf version 



SUPER KRAM'S " Added Features 

• MULTiKEY SUPPORT - Avowing simultaneous access to a 
K^AU iile bf more Than one ^^ey field 

» HI-SPEED HEAD — This texture allows mci'eased'I'Ospetaup to 
60S faster during processing of SUPER KRAM read next. lead 
prevKOus put ana delete requests 

• IMPROVED INDE^f ARCHITECTURE - Allowing taster inden 
searchers and more Bitjcient disk Space utilizaiiOn 

■ INTEGHATED BASIC COMMANDS - Allowing SUPER KRAM- 
commands to be coded in-line witn Basic, providing easier usage 
ol KRAM than ever before 

• USER-SPECIFIABLE BUFFER POOL - Allawirg (he user to 
specpiy how many KRAM files a re allowed open at one lime: will 
support any rtunsbe/ ol KRAM tiles 

• LOGICAL RECORDS {KEYS WAV BE NON UNIQUE) - Records 
added lo the KRAM files ore tmrrrediately accessible by Any of the 
dofiinBd keys lor the liiic [Automatic Upgrade) 

• KRAM 2 liies are totally compaiible with SUPER KRAM 




750 3RD Avenue, 

New York NY 10017 

(212) 682-0347 Telex 640055 



UNITED 
SOFTWARE 
OF 
AMERICA 



Look for the RED-WHITE-BLUE 

United Software Display at your local 
computer dealer, or send check or 
moneyorder. plus $3.00 shipping to: 

DEALER INQUIRIES INVITED 

n^OUESTA KRAM are lrad« marks OiUnit«d Softwaisor Amsrica 



¥ 




Professional Color & B/W Monitors 



NEW 13" COLOR 

The Amdek 13" Color Video 
Monitor is ideal for all personal 
and business computing applica- 
tions. Bright jitter-free text allows 
viewing over extended periods 
without causing eye fatigue, 
especially in word processing 
applications. The low resolution 
display provides 40 characters 
wide by 24 characters deep with 
260 horizontal lines and 300 ver- 
tical lines. 

This compact, lightweight 
monitor (only 25 lbs.) has a 
molded-in carrying handle, 
making it easy to move. Its 
industrial grade construction and 
shatter resistant case provide 
reliable service in both office and 
industrial environments. All 
front mounted controls make 
it easily adjustable at a a 

glance without the loss ' 
of a single keystroke. , 





'— *^Br 




VIDEO 100 12" B/W MONITOR 

This highly reliable 12" black and white 
monitor features a 12MHz band width and 
80 character by 24 line display. Plug-in com- 
patibility with Apple, Atari, Radio Shack, 
O.S.I., Micro-Term and Exidy make this the 
perfect text display for almost any system. 



VIDEO 100-80 12" B/W MONITOR 

The model 80 features an industrial grade 
metal cabinet with built-in disk mounting 
capability and space for an 11 " x 14" PC board 
for custom designed electronics. Front 
mounted controls include power, contrast, 
horizontal hold, vertical hold, and brightness. 



Amdek Corp. • 2420 E. Oakton Street, Suite "E" • Arlington Heights, IL 60005 • (312) 364-1180 TLX: 25-4786 



Amdek Cora the new name for Leedex . . . Expanding for the future, growing with success. 



March. 1981 Issue 10. 



COMPUTi! 



machine. One of the magazines (Micro) checked with 
us to see our feelings on such advertising. We in- 
dicated that we wouldn't run such ads, given that the 
software in question could be used to produce 
duplicate copies of "protected" and proprietary soft- 
ware. Wc understand that Micro has since decided to 
do the same. 

We applaud this move toward protecting the 
rights of the software industry, and encourage addi- 
tional comment. 

The Rights Of The Buyer 

This isn't intended to be an inclusive comment on 
the rights of software buyers, but an attempt to open 
discussion. I already know of one COMPUTE! 
Associate Editor who has definite feelings on the sub- 
ject. We'll try to get him involved in the discussion 
on these pages. 

The buyer of a copy-protected diskette has 
potential problems, and deserves to be protected as 
well. Vendors of software would remove the 
legitimate need for copying software if they would 
adopt a customer oriented, fully responsive plan for 
allowing licensed owners of software to quickly, con- 
veniently and most of all, economically, obtain a 
back-up in the case of iailure of a diskette. 

The principal of repetitive back-ups is rightly 
embedded in the history of data processing tech- 
nique, and can't be ignored in an industry rush to 
protect proprietary software from duplication. Per- 
sonal Software appears to be trying to deal with this 
with Visicalc, and I'm sure other vendors are as 
well. The vendor has the right to protect proprietary 
software. The vendor also has the obligation to pro- 
tect the customer's interest. The extent of this protec- 
tion of the mutual interests of both will ultimately 
help define the e.xistence of the protection violation 
market, and the strength of the software market as a 
whole. We'll eagerly await your comments. 

The Boston Commodore Show; 
VIC Meets The Consumer 

Judging from the interest in VIC at Commodore's 
Boston Show (February 6, 7), the $299.95 color com- 
puter entry from Commodore will be well received. 
One of the biggest unresolved problems of the 
moment is: "When will production be up and run- 
ning?" They're currently saying March-April, and I 
think they'll make it. BASIC, by the way, is the 
well-known upgrade ROM set, and color animation 
capabilities are rather nice. We hope that Com- 
modore will see their way to a nice introductory 
package price. Watch our April issue for a full 
review of VIC, and mid- April for the availability of 
our brand new quarterly magazine, exclusively for 
the VIC. It's called Home and Educational COM- 
PUTING!, and is announced elsewhere in this issue. 

Atari Update 

They're still selling as fast as they can make them. 
What else can we say? @ 



A Beginners 

Guide To 
COiVIPUTE! 

If you're just getting started with your computer 
or with COMPUTE!, here are several notes to 
help you use COMPUTE!: 

Presentation 

In every issue we try to present a balanced 
group of articles ranging from material for 
beginners to material for old hands. Frequently, 
a beginner can get a great deal out of an ad- 
vanced article, even though much of it may be 
over his or her head. 

Program listings are presented as legibly as 
possible. Pet programs are generally reproduced 
and reformatted here where we've developed 
software to "translate" the special Pet graphics 
characters into characters printable by our 
equipment. These are explained below: 

Program Listings for COMPUTE 

Cursor control characters will appear in source listings 
as shown below: 

Jl=HOME , fi=CLEAR SCREEN 

^=DOWN CURSOR , T=UP CURSOR 

>=RIGHT CURSOR, <=LEFT CURSOR 

jl^REVERSE , f = REVERSE OFF 

Graphics (i.e. shifted) characters will appear as the 
unshifted alphanumeric character with an underline. 
This docs not apply to the cursor control characters. 
The Spinwriter thimble doesn't have a backarrow 
symbol, so a "-"" is used instead. 

The "-n" is used to indicate the beginning of a 
continuation line. It is also used to indicate the end 
of a line which ends with a space. This prevents any 
spaces from being hidden. 

If, for example, you're an Apple owner using a 
Pet program that's reproduced in this fashion, 
you'll need to be familiar with these special 
characters so you can program around them. As 
more computers implement versions of 
Microsoft BASIC, the programs should become 
more and more transportable. @ 



Reader's Feedback will return next issue in a revised and 
expanded format. Keep those letters and editor's feedback 
cards coming. By the way, see our New Products section, 
new this issue. RCL 



X) 



COMPUTEI 



Morch, 1981. Issue lO. 



A 6502 Version Of The 

Winter 
Consumer 
Electronics 
Show: 
January, 1981 



David D. Thornburg 

Innovision 

P.O, Box 1317 

Los Altos, CA 94022 

At a time when most normal folks are taking down 
the holiday decorations, and preparing for the new 
year, those of us who haunt the trade shows were 
anxiously preparing for our January fix — the 
Winter CES (Consumer Electronics Show) held in 
Las Vegas. Unlike specialized trade shows, like 
Comdex, the CES has exhibits covering almost all 
consumer products that arc likely to contain silicon. 
Because of the continuing recession, only 55,000 
people attended this show which was held in the Las 
Vegas Convention Center and in two nearby hotels. 
Rather than describe some of the more novel pro- 
ducts, such as the talking microwave oven (with, 
would you believe it, a Japanese-English accent), or 
the solar rechargeable flashlight (look, I couldn't 
make this stuff up if I tried, so believe mc!), I de- 
cided to mention some of the products of greater 
relevance to COMPUTE! readers: the 6502-based 
microcomputers which were displayed. 

As far as hardware is concerned, the big hit of 
the show was the Commodore VIC-20 (your fearless 
scribe is preparing a review of this machine to appear 
in a forthcoming issue of COMPUTE!). At a suggested 
retail price of $299, it is apparent to me that Com- 
modore has the technical ability to give the Radio 
Shack Color Computer a solid run for its money. In 
fact, I expect VIC sales to place Commodore firmly 
in the number two spot for total machine placements, 
and perhaps to even edge up on our Texas friends. 
The styling is beautiful and the price is right, but 
even more importantly, Commodore is going all out 
to support the cottage industry that has kept the PET 
well supplied with software. Watch for the FCC ap- 
proval, followed by the VIC showing up in your cor- 
ner computer store sometime in March or April, 



Software had its day at CES also. Atari showed 
both their new PILOT cartridge (see this month's 
Computers and Society column), and also showed 
their word processor package. Both pieces of soft- 
ware are very well done, and should do much to help 
Atari on its accelerating growth curve. While I didn't 
see any new Atari hardware on the floor, there were 
rumors of some nice new things hidden away in their 
hospitality suite. It is apparent that Atari is in this 
game for the long haul. 

Those of you who are waiting for the keyboard 
portion of the Mattel Intellivision (complete with a 
6502-based computer with 16 K of RAM and a 
Microsoft BASIC) will have to wait a little longer. 
Once again they say that deliveries will begin in 
March — only the year has changed. 

The absence of Apple and OSI from this show 
was noted. Apple has apparently decided to focus its 
efforts in the small business market, and leave the 
home computer market to fend for itself for awhile. I 
saw lots of Apple folks at the show, however, so they 
can't have totally lost interest in the consumer 



For those of us who hove 
invested in 6502-based systems, 

it is heartening to see that this 

processor continues to be among 

the most popuiar. 



market, OSI, on the other hand, has had nice ex- 
hibits at this show for quite some time, and I have to 
assume (without checking it out) that their absence 
was due more to their recent acquisition than to any 
plans they have to depart from the low-end market. 

The 6502-based hand held computer from 
Matsushita (which will be marketed both through 
Panasonic and Quasar) was shown running a com- 
munications interface hooked up to the Source. It ap- 
pears that the software for this computer is almost 
finished, and that we can expect to see it hit the 
market in a few months. Considering that this com- 
puter, with modem and coupler, will have a retail 
price in the $1,000 range, I find its small keyboard 
and one-line liquid crystal display to be annoying. 
On the other hand, if you want the ultimate in por- 
tability, this might be just the computer for you. 

It was interesting to note that all the other com- 
puters at the CES (excepting the TI 99/4) used either 
the 8080 or Z-80 microprocessor. There were no new 
16-bit computers introduced. For those of us who 
have invested in 6502-based systems, it is heartening 
to see that this processor continues to be among the 
most popular. It is clear that our investment will re- 
tain its value for quite some time. 



March, 1981 Issue lO. 



COMPUTE! 



IN 1981... 

DO IT THE EASY WAY! 



with the 

TAX PREPARER 

by HowardSoft 




Easy-to-use features with complete professional 

results: 

• All schedules (A, B. C, D, E, F, G, R&RP, SE, TC) 

• Many forms (1040, 2210, 2106, 3468, 4562, 4726, 
4797, 5695) 

• IRS-accepted format for direct filing of print-outs 

• On-screL-n preparation using facsimile of IRS forms 

• Year-long record-keeping and building of itemized 
files 

• Numerous tax alternatives easily analyzed 

• Files for numerous taxpayers easily compiled 
and edited 

• Fully compatible with all printers 



• Use u'ith or without line printer 

• Use with or without two disk drives 

• Includes full documentation, sample returns, 
and two disks (program disk and storage disk) 

Available at your dealer for $99 
(suggested retail) 



^ • Howard Software Services 




lor the SERIOUS Personca Computet User 
7722 Hosloid Ave i Los Angeles. CA 50O45 | (213)6454069 



12 



COMPUTE! 



March, 1981 issue 10. 



The Beginner's 
Page 



Robert Lock, 
Editor/Publisher 



COMPUTE! is a specialized resource magazine that 
provides editorial coverage of a family of micro- 
computers that share a common "central processing" 
chip — the 6502. With the proliferation of small 
computers, we find that you can obtain more useful 
and relevant information in a magazine that doesn't 
(for example) cover the TRS-80 computer line. It, by 
the way, uses a different microprocessor chip: the 
Z-80. A whole different family of chips, and a dif- 
ferent family of machines. 

Mapping COMPUTE! 

We're organized sequentially, with the front section 
of the magazine devoted to material of general in- 
terest and utility. The following sections are devoted 
to specific machines. These are called Gazettes, and 
contain information pertinent to your special 
machine. Frequently, however, you'll find useful 
material in other sections (Gazettes) of the magazine. 

Where The Sets Merge, Or Common Interests 

All of your machines have available a programming 
language called BASIC. BASIC stands for Beginners 
All-purpose Symbolic Instruction Code. It's what is 
called a higher-level language. BASIC differs 
somewhat on the different machines, so you'll find 
some things in common with other BASIC'S and 
some differences. In practice, BASIC simply makes it 
easier for you to talk to your 6502 microprocessor. 
The 6502 sits at the heart of your machine. It and 
supporting "firmware" and "hardware" make your 
machine capable of doing what it does. In a nutshell, 
you feed your 6502 instructions that it can act on. It 
only acts on very picky little sets of numbers, and 
that's why you have BASIC. BASIC serves as an 
English-language like translator for you, taking your 
instructions in a pseudo-English format and 
translating them for the 6502. 

Other portions of firmware contribute to your 
machine's features. Someone has already written a 
6502 program that resides in your machine, inter- 
acting with BASIC, and passing out instructions to 
the 6502. This program (or set of programs) is called 
the Operating System. It is permanently inscribed 
onto a chip or set of chips inside your machine. Its 
permanence implies its generic name: firmware. 
Hardware characteristics also help define your 
machine and its capabilities. Memory is one impor- 
tant characteristic. Memory is your working space. 
It's much like the work area you have on top of your 
table. Let's assume you have a table of x size, and 
you're ready to start a project. You have a set of 
notes and instructions previously developed to help 
you with your task. Let's also assume that you may 



not write on ycur previous notes, but you may refer 
to and use thern freely. These notes and instructions 
are much like cine kind of memory in your computer: 
ROM. Read Only Memory is memory that has a 
program already saved on it. The program doesn't 
go away when you turn your machine on and off. 
This, then, is your firmware: the ROM, or set of 
ROMs, where "permanent" programs, or sets of in- 
structions, reside. The number of instructions your 
Operating System can have, e.g. in part its complex- 
ity, is then directly related to the amount of ROM in 
your machine. Let's stack up these beginning 
"notes" on one side of your desktop. We'll assume 
that they take up one-quarter of the table space. We 
can use them always, but we can't stack anything 
else there. 

Now let's add a clean notepad to our workspace. 
We'll call this our work area. Everytime wc come 
back to our des;k to work, we'll assume we have x 
amount of clean space to put our notepad on, and do 
whatever work we want. This "fiexible" work area 
equates to RAM. Random Access Memoiy is 
another type ol" memory inside your computer. 
Unlike ROM, which has a set of instructions "built- 
in", RAM is empty. It's your working area; the 
space you use for putting in your own information. 
After you put something in it, you can use it, 
reading from it later, and so on, just like your note 
pad. And like your notepad, you can continue to 
return to it, reading from it and writing to it. Until, 
of course, you turn your computer off. Your RAM is 
wiped clean when the power goes away. 

Storage Media 

This is why your computer has a storage device. 
Whether it's a tape cassette or a disk drive, it's there 
to save the contents of your RAM. Let's assume 
you've entered a set of instructions. We know where 
they are: they're in RAM. We also know that once 
the machine is turned off, these instructions will be 
era,sed from RAM. The solution is simple. Save 
them somewhere. When you want them bark, your 
Operating System will take care of reading them 
back into RAM. 

Where Are Vie? 

We've just covered the areas that make your small 
computer a truly remarkable and powerful device. It 
has a set of predefined features, controlled by perma- 
nent instructions, and aided by design features that 
always make it "act" the same way. Your calculator 
is much like this; and your microwave oven; and the 
host of other consumer products that are utilizing 
some form of microprocessor chip. The firmware in 
these devices is simply a set of permanent instruc- 
tions to a computer chip. But your computer has a 
whole lot more. It has RAM, allowing you work 
space to develop your own sets of instructions to your 
computer chip. Aha! Tremendous flexibility. And it 
has a storage device, allowing you to save the effort 
of your labors, retrieving them at will for u.se and 
further development. © 



Osborne Polishes 

THE APPLE 




and Publishes 

THE GUIDE 

The Appte II User's Guide by Lon Poole, Martin McNiff. and Steven Cook #46-2. $1 5. a 

This Guide is the key lounlocl<ing the full power of your Apple Nor Apple II plus computer. The Apple II User's Guide brings together in one place 
a wealth of information for Apple computer users. It will tell you more about your Apple tfian any other single source. 

Topics include: Applesoft and Integer BASIC programming - especially how to make the best use of Apple's sound, color and graphics 
capabilities. The book presents a thorough description of every BASIC statemeni. command and function. Machine level programming - 
although not a machine language programming guide, this book covers the Machine Language Monitor in detail. Hardware features - the disk 
drive and printer are covered in separate chapters. Advanced programming - special sections describe high resolution graphics techniques 
and olher advanced applications. 

This book will save you both time and effort. No longer will you have tosearchertdlesslyforusefulinformation. It's all here, in the Apple II User's 

Guide, thoughtfully organized and easy to use. -Appie is a Itademark of Ihe Apple Compuler Corporation 



More Osborne Books for Apple Users 



P!i 



6502 

Assembly Language 
Programming 

by Lar^ce Leventhal 
Here's the booh ihat shows you how to 
program Ihe Apple in iTssemWy language. 
' Wilh ils numerous relerence lables, ex- 
planattons and descriplions, this book is a 
major accomplishrnont Jfs by lar tlie 
most complete 6502 book to appear 
Make space on your Bookshell You'll 
want 10 keep Ihis one handy." 

COMPUTE 
Book «27-6 ST6.99. 606 pp. □ 



Some Common BASIC 
Programs 

by L. Pooie and M. Borchers 
Written m a subset ot standard BASIC thai 
is compatible wrth many microcomp jlers, 
ihis book coniains 76 useful and easy-lo- 
LTse programs- The booh explains how 
each program works, shows sample runs, 
and has program listings with remarks "If 
you want to do mathematics or slalistical 
programming on your cnmputer, Ihis book 
IS a must." ON COMPUTING Magazine 
Bcok i!06-3. S14,99, 200 pp. D 



Practical Basic Programs 
edited by Lon Poole 
Here's a coireciion of 40 programs you 
can easily key m and use on most mrcro- 
computers. Practical Basic Programs is 
especially useful m small business appSi- 
calions. II solves problems in finance, 
management, and statistics. The book 
conlaina sample runs, praciical problems, 
BASIC source lisiings. and an easy to^ 
follow narrative to heSp you realize ihe 
potential uses of each pfogram. 
Book «3B-I. Si 5 99, Zm pp. D 



An Introduction to 
Microcomputers 
Volume I - Basic Concepts 
Second Edition 

by Adam Osborne 
The world s best selling textbook on 
microcomputers develops a detailed pic- 
ture of what a microcomputor can do. how 
it does what il does, and how it can be 
used in any practical environment. TNs 
IS the most comprehensive and up-to- 
date introduction to microprocessor 
systems available anywhere 
Book fi34.9, SI3.99. 320 pp D 



Make check payable to: f^"^ osBORNE/McGrawHiii 
630 Bancroft Way. Berkeley. CA 94710 Dept G4 

Name 



Phone Orders: (415) 548-2805 or Toll Free 800-227-2895 



Address . . 

Ciiy/Stale/Zip . 

Plus D .75/iIem 4th class D S1,25/ilem UPS n S2.50/item Air Man D $4.00/ilem Overseas (Califomia residenis add applicable lax.) 

Total Amount Enclosed S . or charge my D VISA D Mastercharge Card # Exp. Date 

Signature _ _ __^ _^ □ piea^e send me your tree catalog 



14 



COMPUTE! 



March, 1981. Issue lO. 



Computers 
and Society 

David D, Thornburg 

Innovision 

P.O. Box 1317, Los Altos, CA 94022 

As R. Buckminstcr Fuller is fond of pointing out, 
synergy is the behavior of whole systems which is not 
predicted by the behavior of the parts taken sepa- 
rately. There have been two recent developments in 
the personal computer world which, taken together, 
have the promise of true synergism. These events are 
the publication of Se)'mnur Papcrt's long-awaited 
book: Mindstorms - Children, Computers, and 
Powerful Ideas (Basic Books), and the introduction 
of the language PILOT for the Atari computers. 

Since this year's theme is communications, it is 
only appropriate that we spend some time looking at 
the communication between the user and the com- 
puter. While the mechanical means through which 
this communication takes place are worthy of exten- 
sive discussion, I want to concentrate this month on 
the nature of the language through which we interact 
with computers, since this also is an area of intense 
importance. 

One might argue that there is little reason for 
concern with computer languages at this point, since 
we all have access to fairly powerful versions of 
BASIC on our computers. We might all agree that 
BASIC is not terribly hard to learn, and that there 
are lots of very exciting BASIC programs, and even 
that BASIC has become the dejado standard com- 
puter language for personal computers. 

But even with the tremendous penetration of 
BASIC in the marketplace, I have yet to fmd any 
serious computer user (regardless of age) who really 
likes it. At the primitive level of programming at 
which we all start, BASIC works pretty well. But as 
we get more sophisticated, most of us fmd ourselves 
writing code that we can't understand two weeks 
after we write it. 

Of course, there are detractors of BASIC who 
feel that languages like PASCAL are the solution. I 
must confess that I find PASCAL lacking in that h 
doesn't encourage the user to sit down and start 
writing some small part of a program, to play with 
the bits and pieces, and to then bring everything 
together later on. This is one area in which BASIC 
excels. For those who feel that people should be 
organized when they write a program, PASCAL 
(and C and other "serious" languages) may very 
well be the best choice. But what about the new com- 
puter user who wants to build a highly interactive 
program, or the child who wants to explore concepts 
in geometry through the experience of programming 



rather than through playing a pre-defined "game" or 
sitting at a "canned" CAI lesson? These people need 
languages which arc interactive, highly flexible, 
extraordinarily powerful, and are easy to get started 
with. 

LOGO And PILOT Are Two Such Languages. 

While LOGO (as this is being written) does not yet 
exist on commercial personal computers, it has been 
the subject of an extensive research program at MIT 
for inore than a decade. Much of the research has 
been devoted less to the development of computer 
languages per se, than to the development of a com- 
puter assisted learning environment for children. The 



...for some educators, Computer 
Aided Instruction has come to mean 
"computers programming children". 



goals, aspirations and results of this work are the 
subject of Papert's Mindstorms. It is hard to im- 
agine any person who is intensely concerned with the 
use of computers by children who would fail to be 
moved by the sweeping vision implicit in Papert's 
work. Writing from the perspective of a maihemeti- 
cian who spent much time with Jean Paiget, Papcrt 
presents a variation on the Paigetian model of the 
"child as builder" in that he sees the need for 
children to have an abundance of materials with 
which to build things. 

That the computer can be one such building tool 
is the cornerstone of the many computer literacy ac- 
tivities we see springing up around the world. But, 
for some educators, Computer Aided Instruction 
(CAI) has come to mean "computers programming 
children". There is much to be gained from revers- 
ing this process — and that is where the need arises 
for an exceptionally powerful (and easy to learn) 
computer language. 

LOGO is a highly interactive language which 
contains a graphics environment containing 
something called a "Turtle". The Turtle is a non- 
Euclidian point (having both position and direction, 
rather than a position alone). The programmer can 
send mes.sagcs to the Turtle which cause pictures to 
be drawn on the display screen. Those of you who 
arc familiar with the Milton Bradley Big Trak are 
already familiar with this idea. To draw a square on 
the screen, for example, a child working in the 
Turtle micr-oworld might type: 
FORWARD too 
RIGHT 90 
FORWARD 100 
RIGHT 90 
FORWARD 100 
RIGHT 90 
FORWARD 100 
RIGHT 90 \ 



March, 1981. Issue lO. 



COMPUTE! 




HAVE WE 

G0TAPR06RAM 

FOR YOU Mm 

Attend the biggest public computer shows in the country. 
Each show has 100,000 square feet of display space fea- 
turing over 50 Million Dollars worth of software and hard- 
ware for business, industry, government, education, home 
and personal use. 
You'll see computers costing $150 toS250.000 including 
mini and micro computers, software, graphics, data and word 
processing equipment, telecommunications, office machines, 
electronic typewriters, peripheral equipment, supplies and com- 
puter services. 

All the major names are there including; IBM, Wang, DEC, 
Xerox, Burroughs, Data General, Qantel, Nixdorf, NEC, Radio 
Shacf<;. Heathkit, Apple, RCA, Vector Graphic, and Commo- 
dore Pet. Plus, computerized video games, robots, com- 
puter art. electronic gadgetry. and computer music to 
entertain, enthrall and educate kids, spouses and peo- 
ple who don't know a program from a memory disk. 
Don't miss the Coming Of The New Computers- 
Show Up For The Show that mixes business with 
pleasure. Admission is $5 for adults and $2 for chil- 
dren under 12 when accompanied by an adult. 



Ticket Information 

Send S5 per person wilh the name ol Ihe show 
you witi attend to Nalionai Computer Shows. 
824 Boylston Streel, Cheslnut Hill. Mass. 02167, 
Tel. 61 7 739 2000. Tickets can also be purchased 
at the show. 



DALLAS 
Dallas Market Hall 

2200STEMMONSrRWY 

AT INDUSTRIAL BLVD 

THURS-SUN 

APRIL 9-12 

10 AM TO 7 PM 



CHICAGO 
McCormick Place 

SCHOESSLING HALL 
23RD& THE LAKE 

THURS-SUN 

SEPTEMBER 10-13 

10 AM TO 7 PM 



WASHINGTON, DC 
DC Armory/Starplex 

2001 E, CAPITOL ST SE 

(£ CAP ST EXIT OFF 1295 

-KENILWORTHFRWY) 

ACROSS FROM RFK STADIUM 

THURS-SUN 

SEPTEMBER 24-27 

10 AM TO 7 PM 



BOSTON 
Hynes Auditorium 

PRUDENTIAL CENTER 

THURS-SUN 

OCTOBER 15-18 

10 AM TO 7 PM 



ATLANTA 
Atlanta Civic Center 

395 PIEDMONTAVE NEAT 

RALPH McGILLBLVD 

THURS-SUN 

OCTOBER 29-NOVEMBER 1 

10 AM TO 7 PM 



16 



COMPUTE] 



March, 1981. Issue lO. 



As each instruction is executed, the Turtle first 
moves forward by 100 units, and then turns right by 
90 degrees, drawing its path on the screen as it 
moves. The desired square thus takes shape on the 
screen. A programmer wishing to use squares quite 
frequently might wish to extend the repetoire of com- 



... Children are asked to find 
the bug by "playing Turtle". 



mands the Turtle uses by defining a new procedure 
which the Turtle then "understands": 
TO SQUARE 
REPEAT 4 

FORWARD 100 

RIGHT 90 
END 

If squares of arbitrary size are required, one might 

write: 

TO SQUARE :SIZE 

REPEAT 4 

FORWARD :SIZE 

RIGHT 90 
END 

and then, anytime a square is desired, one would 

type, for example, 

SQUARE 47 

to draw a square with each side 47 units long. 

The value of using the Turtle environment in an 
interactive way is expressed by Papert this way: 
WoTking in Turtle microworlds is a model for what 
it is to gel to know an idea the way you know a per- 
son. Students who work in these environments certainly 
do discover facts, make prepositional generalizations, 
and learn skills. But the primary learning experience is 
not one of memorizing facts or of practicing skills. 
Rather, it is getting to know the Turtle, exploring what 
a Turtle can and cannot do. It is similar to the child's 
every day activities, such as making mudpies and testing 
the limits of parental authority — all of which have a 
component of "getting to know". 
One of the more valuable experiences for children in- 
volved with computers is learning how to "debug" a 
program with errors in it. Traditionally, we are 
taught that errors are bad. Papert shows that, by ac- 
cepting the inevitability of errors in programs, 
children can learn to analyze the results of the error 
and then learn to avoid the error in the future, and 
to "patch" it in the meantime. 

In order to make the debugging process as 
meaningful as possible, children are asked to find the 
bug by "playing Turtle". The child then walks 



The ATARI® Tutorial 

CDi;FJTEn 

Calligraphy? 

Well, not really! But with the FONTEDIT program in IRIDIS #2 
you can design your own character sets (or fonts) for tfie 
ATARI. For example, you can create a Russian alphabet, or 
APL characters, or even special-purpose graphics symbols. 
These special tonis can be saved on ^\sU. or tape for later use 
by your programs. FONTEDIT is a friendly, easy-to-use 
program: just grab a joystick and start designing. 



■i.-i)X'"nnyi'r 



FONTEDIT 



J V h n / 



With our KNOTWORK program, you can design patterns of 
Ce/ffC interlace, (a technique used by 7th century Irish monks 
to illuminate manuscripts). After you have produced a pretty 
pattern on the screen of your ATARI, you can save it on disk or 
tape. As you might expect, KNOTWORK uses custom graphics 
characters tf-at were created with FONTEDIT, 




FONTEDIT and KNOTWORK are available now\r\ IRIDIS 
«2, the second of our ATARI tutorial program packages. 
You get a C-30 cassette or an ATARI diskette with our 
excellent programs ready to load into yourATARI.Best of 
all, IRIDIS *f2 comes with a 48-page User's Guide, which 
gives clear instructions on how to use the programs. The 
Guicte also provides detailed, line-by-line descriptions 
of how the programs work, (IRIDIS programs are written to 
be studied .as well as used.) Our Hacker's Delight column 
important PEEK and POKE locations in explains many 
your ATARI. 

The User's Guide also includes Novice Notes for the 
absolute beginner.We don't talk down to you, but we do 
remember how it (eels to be awash in a sea of byfes 
and bits and other technical jargon. If you are new to 
programming, IRIDIS is one of the easiest ways you can 
learn how to get themost out of your ATARI. If you are an 
old hand, you'll be delighted by the technical excellence 
of our programs. (We are the people who have published 
CURSOR for the Commodore PET since July, 1978.) 

ATARI IS Fl !f3C'^m;irK cf ATARI, lr.c «____*••« 



ORDER FOHM 



Published By -[-^g Qf^^^^ 

Works 



Q 11S.9;CMMtH □ HS9S Oiik B OX 550 ^-!-' 

Goleia. CA 93116 
IRIDIS ■! - Cioik. z«p. 199°' ^°y^°'^*__ _. 605-6831585 

Dealer Inqumes invited. 



D S9.M C««n« D t12,9S Dlik 





7in 


















IRIDIS TWHJi'^i '^<" tof caWPlte 24k lar disk 



March. 1981 Issue lO. 



COMPUTEI 



INTRODUCING 

COGNIVOX Series VIO-1000 

A Revolutionary New 

Voice Input and Output Periplieral 




Higli Fidelity Voice Response 
Industrial Quality Recognition 

PET — AIM-65 — APPLE R 

COGNIVOX series VIO-1000 is a top-of-the-line voice I/O 
peripheral lor business and educational applications and tne 
demanding tiobbyist. 

It can be trained to recognize words or short phrases drawn 
from a vocabulary of 32 entries chosen by the user. It will talk 
back with up to 32 words or short phrases. In disk based systems, 
response vocabularies can be stored on the disk and brought to 
memory as needed, giving an effectively unlimiled number of 
vocabular y entries. The quality of voice response is excellent, 
and It js far superior to thai of speech synthesizers. 

COGNIVOX series 1000 comes complete and ready to plug 
into your computer (the computer must have at least 16K of 
RAM). It connects to the parallel I/O port of thePET. tothegame 
paddle connector on the Apple and tothe J1 port ontheAltvl-65. 
Connectors are included as required. Also included are a 
microphone, cassette with software and extensive user manual. 
A built-in speaker/amplifier is provided as well as a jack lor 
connecting an external speaker or amplifier. 

Software supplied with COGNIVOX includes two voice 
operated, talking video games. VOTH and VOICETRAP. These 
games are absolutely captivating to play, and the only voice 
operated talking games that are commercially available. 

Adding voice I /O to your own programs is very simple. A single 
statement in BASIC is all that is required to say or to recognize a 
word- Complete instructions on how to do it are provided in the 
manual. 

In keeping with the VOICETEK tradition of high perlormance at 
allordable price, we have priced COGNIVOX series 1 000 at the 
unbelievably low. inlroductory price of $249 (plus S5 shipping in 
the US. CA add 6% lax. Foreign orders welcome, add 10% for 
handling and shippingvia AIRMAIL) When ordering, pleasegive 
the make and model of your computer, the amount ol RAtvl and 
whether you have disks or not. 

In addition to COGNIVOX series VIO-1000, VOICETEK 
manufactures a complete line of voice I/O peripherals lor most 
ol the popular personal computers. Speech recognition-only 
peripherals are available for the 8K PET and the 4,K AIM. 



For more inlormation call 
address below. 

Dealer Inquiries invited. 



VOICETEK 



us at 805-685-1854 or write at the 



Dept A, P.O. Box 388 
Goleta, CA 93116 



around the floor, executing each instruction in turn 
until the "fauhy" instruction is found. But doesn't 
this method for finding errors lead the child to 
"thinking like the computer"? Papert sees this ex- 
perience in a larger context. He says: 

In my experience, the fact that I ask myself to "think 
like a computer" does not close off other epislemologies. 
It simply opens new ways for approaching thinking. 
The cultural assimilation of the computer presence will 
give rise to computer literacy. This phrase is often taken 
as meaning knowing how to program, or knowing about 
the varied uses made of computers. But true computer 
literacy is not just knowing how to make use of com- 
puters and computational ideas. It is knowing when it 
is appropriate to do so. 
While Papert is quite heartened by the growth of the 
personal computer industry, since this growth will 



He likens BASIC to the QWERTY 

layout on the keyboard— an 

artifact from a time wtien 

better things didn't exist. 



result in children having ever easier access to com- 
puters, he is frustrated by the limitations of these 
machines and by the extremely strong penetration of 
BASIC into the marketplace. He likens BASIC to the 
QWERTY layout on the keyboard — an artifact 
from a time when better ways didn't exist. But what 
of LOGO itself? This language will not be forever 
locked in the University laboratory. Versions for the 
TI 99/4 and the Apple computer will probably come 
into general availability soon. 

Even if LOGO, with all its power, doesn't make 
its appearance in the marketplace soon, I feel that 
many of Papert's ideas can be implemented today on 
the small computers whose capabilities he dislikes, 
through the medium of the language PILOT. 

As normally written, PILOT interpreters allow 
the user to create spectacular text manipulation pro- 
grams (c.f , the article by Thornburg and Thornburg 
in the first issue of COMPUTE!). Recent 
embellishments have made PILOT a splendid 
language to use on computers with high quality 
graphics environments, such as the Atari 400 and 
800. Those of us who use Atari computers can, with 
Atari PILOT, do many of the things Papert does 
with LOGO. 

Those of you who are familiar with PILOT pro- 
bably think of it as a language best suited for 
creating text-based learning materials. My view of 
the language is far more open than that, because it is 
so easy to teach to youngsters. It has long been my 
dream to see the superb text manipulative power of 
PILOT extended to give the user similar power to 



18 



COMPUTil 



March, 1981. Issue lO. 



create pictures. The Atari PILOT is the answer to 

this dream since it contains a graphics package that 
is, in some ways, very similar to the Turtle graphics 
of LOGO. 

For example, an Atari computer user running 
PILOT might draw a square this way: 

GR: CLEAR 
GR: DRAW 25 
OR: TURN 90 
GR: DRAW 25 
GR: TURN 90 
GR: DRAW 25 
GR: TURN 90 
GR: DRAW 25 
GR; TURN 90 

As each instruction is carried out, the square begins 
to take shape on the screen. If the user wants to 
draw lots of squares PILOT allows one to create a 
"module" as a deferred program. By typing AUTO 
at the command level, and then typing: 

•SQUARE 

GR: 4(DRAW 25; TURN 90) 
£: 

A module (SQUARE) is created. On leaving the 
AUTO mode (the AUTO mode automatically places 
line numbers in front of each statement, thus keeping 
them from being executed Immediately), the user can 
draw a square by typing: 

U: 'SQUARE 

in which U: is the USE operator found in all versions 
of PILOT. 

My reasons for giving this particular example 
are two-fold. First, it shows the similarity between 
the Turtle graphics of Atari PILOT and that of 
LOGO. Secondly, it shows that PILOT can be used 
in an interactive mode which combines deferred pro- 
gram segments (modules) with immediate execution 
of commands. 

Can (or should) PILOT replace BASIC? I can 

only answer by saying that, on the Atari computers, 
it has for me. I find the language much easier to 
learn, much easier to use, and capable of doing 
anything I have ever wanted to do. One of its major 
features (especially important when working with 
children) is that a PILOT program can be read by 
someone other than its author. This is rarely the case 
for large BASIC programs. 

Finally, while most users will want to use 
PILOT to write self contained programs, I am very 
happy with the fact that the Atari implementation of 
PILOT allows the user to interact with the language 
without having to write 'Tmished" programs. As 
Papert has shown, the value of "playing around" 
with an interactive language can be great for all 
users, and especially for children. © 

Editor's Note: Atari PILOT is not expected to be available 
until late spring. Check with jour dealer for more informa- 
tion. RCL 



Apple Disk Fixer 




APPLE 

32K, DISK 



13 OR 16 SECTOR 



If you care enoi igh to bade up critical programs and files. Disk 
Fixer^*'wili give i ddilional peace o1 mind. Ttiis poweriul utility 
for experienced A >ple users is a tool kit for manipulating, repair- 
ing, and protectin } all data on disk. 

Use the lilgh-speed lull screen editor to examine and easily 
ciiange any portion of a disk, correct space usage within files, 
and save money l^y locking out bad tracks on disks. Directories 
are alphabetized, If you choose. 

The display an< search capabilities show where specific HEX 
or ASCII data is li )cafed and you can modify any data Including 
binary files. D0S3.2, DOS 3.3 4 language SYSTEM DISK 

Writtan by Jeltrey P. Garbers 
Image Producers, Jnc, Ml RIehts Reserved 



COMPUTER 
PRODUCTS" 



615 Acedemy Drive 
Northbrook, IL 60062 
312(564.5060 




CURE TO 

SOFTWARE 

PROBLEMS 



PROFESSIONAL SOFTWARE 

Medical, Dental & Legal Systems, 
Accounting & Financial, Educational, 
Word Processing, Office Management 

Check your Local Dealer or Contact: 

Chorle/ fflonn & A/zociote/ 

7594 San Remo Trail 

Yucca Valley, Ca. 92284 

(714) 365-9718 



Apple II 



TRS-80 



Tl 99/4 



March, 1981 Issue lO. 



COMPUTE! 



19 



INTRODUCING 

THE NEW IMPROVED 



BUSINESS ENHANCEMENTS 
COMPUSERVICE BUSINESS 

SOFTWARE 

FOR 

COMMODORE 



B.E.C. VALUE ADDED 

BENEFITS • Total commit- 
ment to the development of excellent 
business software for the 



Micro Mini Computer World Inc. is an execlu- A ND 

sive distributor for the BUSINESS SOFT- . TiX^T X^ 

WARE developed by Business Enhance- >^ l^x' JiKl 

ments Compuservice of Escondido. 

California. COMPUTER ^«'^«°°°'"= «»■= ^""'-'^ -° 

If you are sellmg or usmg the ^w-*^-----.— - -^•^ . .-^^ v ^^^^^ systems. 

COMMODORE BUSINESS MACH- C VCT^17"IVf C • At reasonable rates Micro Mini 
INESor the APPLE computer systems, kJ ± O X lIilTJ.k> 

then you should provide yourself and your 
customers with the MOST COST EFFECTIVE and 
COMPREHENSIVE business software for a busi- 



ness computer system. 

CURRENT B.E.C. SOFTWARE 

• General Ledger-Master File 1000 Accounts 
and Journal File 4400 Entries 

• Accounts Receivable-Master File 1170 
Accounts and Invoice File 1430 Entries 

• Accounts Payable-Master File 1170 and 
Invoice File 1430 Entries 

• Payroll-440 Employees 

• Job Costing-1100 Items Per Disk 

• Inventory-1100 Items Per Disk 

• Mail List/Customer Information-1000 
Entries Per Disk 

Above figures apply to CBM 2001 computer 
system with 32K CPU and 2040 dual disk. 
With the new CBM 8050 Megabyte disk the 
volumes will be increased significantly. 

B.E.C. SOFTWARE FEATURES: 

• Complete and total documentation 

• Step by step walk through on every pro- 
gram operation, with examples 

• Each package is MENU driven and uses 
dynamic load and overlay once the initial 
menu is loaded. 

• Examples are provided for all reports and 
other printed forms. All forms are available 

from New England Business Services Inc. (NEBS). 

• All input/output operations use random access 

• Sorts are machine language sorts 

• Programs are interactive with the General 
Ledger and update the GL automatically. 



Computer World Inc. will provide 
software modifications to meet customer require 
ments. (CallMMCWI for further information) 
• EXTENDED WARRANTY which entitles 
users to any enhancements to accounting 
software during the year of coverage. 
{Cost is SI 00 per year) 

Dealers and Interested Parties may obtain a 
copy of the B.E.C. software documentation for 
S2j. If after review you are not interested, 
send the documentation back, in re-saleable 
condition, for a full refund or apply the 
$25 toward your first software purchase. 

The NEW B.E.C. BUSINESS SOFTWARE 
requires a special ROM chip for proper 
operation. 

Suggested Retail Prices are: 

1, Rom chip S70 (required on any software 
package] 

Individual software package SI 50 
All seven software packages $995 (save 
$55) 

DEALER INQUIRIES ARE INVITED 



2. 
3. 




inlcro 
mfnl 



COMPUTER WORLD mc. 



^°H, 




"Country shopp^'*'' 



,^t^ 



74 ROBINWOOD AVE. 
(614) 235-5813 



COLUMBUS, OH(0 43Z13 
(614) 235-6056 



zo 



COMPUTE! 



March, 1981. Issue lO. 



Editor's Note: Although Richard refers to the PET in this 
overview, I recommend this article to all who 've expressed in- 
terest in machine language. RCL 



Taking the 
Plunge- 
Machine 
Language 
Programming 
for Beginners 

Richard Mansfield 
Philipsburg, PA 

If you have been using BASIC for a while now, you 
can probably go in and out of STR$ and VAL and 
there is no mystery to ON GOTO anymore. In fact, 
the only strange BASIC statements at this point are 
USR, SYS, and PEEK and POKE. They are 
gateways into Machine Language and that is still an 
unknown area. Take heart. It is said that people who 
first learned programming using Machine Language 
(M.L.) can find BASIC confusing, 

In this article I will discuss aspects of M.L. pro- 
gramming which were unclear or difficult for me 
when I went on to learn M.L, after a fairly complete 
grasp of BASIC. I had seen "assembler listings" in 
magazines with their usual warning that the numbers 
must be entered exactly or the program could not 
work. And the numbers themselves were in HEX — 7 
and 10 was OA! It seemed difficult. It really isn't 
that hard (but try to explain to a non-computerist 
that BASIC isn't that hard). 

The first thing to do is to get a good book on 
6502 (our computers' CPU chip) programming. 
There are five or so, but among the best are "Pro- 
gramming the 6502" by R. Zaks (Sybex) and "6502 
Assembly Language Programming" by Lance Leventhal 
(Osborne). You can ignore such information as 
signed binary, floating point, octal, hardware and 
input-output chapters. What you want to learn is the 



meaning of hexadecimal and binary — two new ways 
to express numbers. 

"Machine Language" means that you are enter- 
ing statements in exactly the way that your 6502 pro- 
cessor will see them. By contrast, a BASIC statement 
such as LOAD represents hundreds of M.L. 
statements which have already been programmed by 
somebody at Microsoft and frozen into ROM chips 
inside the comp Jter. When the computer (always 
scanning and waiting for carriage returns) finds that 
you have typed LOAD, it has a list of addresses and 
chooses the one associated with LOAD and jumps 
(JMP it's called) to the address in ROM where the 
proper sequence of M.L. operations is set dowr. 
This sequence is like a subroutine. And BASIC- itself 
is nothing more than a huge web of thousands of 
M.L. subroutines. In the PET, for example, if you 
want to jump to the subroutine that sends the 
number in the 6502's "accumulator" (defined below) 
to your screen, you type SYS 65490 and the com- 
puter is thrown into its M.L. mode and told to start 
doing the task v/hich begins at the 65490th memory 
cell in it's brain. That is near the top. There are 
maps of the computer's memory cells. 

A Simple Map of the PET's Brain 

to 1023 — RAM (you can change it's contents), but 
used by BASIC to store addresses (called pointers), 
temporary data (such as what you type in from the 
keyboard, called input buffer), temporary data of its 
own in a stack, and all manner of reminders to itself 
about whether or not the tape recorder is on, etc., 
(called flags). So, if you tamper with these memory 
cells, you might confuse the computer enough to 
send it into an ondless loop within itself and you 
cannot communicate with it again until you turn off 
the power and farce it to reset (get itself together). 
1024 to 32767— your RAM to use for BASIC 
programs, or M.L. programs which you put 
together. Unlike ROM, these cells can each contain 
any number from to 255. ROM is frozen with its 
various numbers carved in forever. All PETs start 
their RAM here , but if you have 8k then you can 
only use RAM up 8000 cells from 1024. 

32768 to 33791— the cells of your screen (40 
column screens). 

36864 to 45055 — space for you to add new 
ROM chip:; such as Toolkit. 
45056 to 65535— BASIC itself, along with the 
computer's instructions about interrupting itself 
(if you should press STOP, for example), how to 
run the T.^''. (CRT or monitor), how to talk 
to the peripherals (I/O), and other housekeeping 
chores (called the operating system). 
Far more detailed maps are available to tell you 
exactly where things happen inside. See back issues 
of COMPUTE! for Jim Butterfield's exhaustive 
maps for PET (i.ssues #1, #6), APPLE (issue #2), and 
others (issue #2). 



March. 1981, Issue lO. 



COMPUTE! 



21 



QUALITY DISK SOFTWARE 

BACKED BY ON-GOING APPLICATIONS SUPPORT 

from SPECTRUM SOFTWARE 



APPLE 11 ® 

HOME FINANCE PAK I: Entire Series S49.95 ® (D 

CHECK REGISTER AND BUDGET: This comprehensive CHECKING ACCOUNT 
MANAGEMENT SYSTEM nolonly keeps complete records, it also gives you 
the analysis and control tools you need to actively manage your account. 
The system provides routines tor BUDGETING INCOME AND EXPENSE 
AUTOMATIC CHECK SEARCH, and BANK STATEMENT RECONCILING. CRT or 
printer reports are produced for ACTUAL EXPENSE vs BUDGET. CHECK 
SEARCH DISPLAY RECONCILIATION REPORT and CHECK REGISTER DISPLAY 
by monlh. Check entry is prompted by tiser-delined menus of standard 
purposes and recipient codes, speeding data entry and reducing disk 
storage and retrieval time Six fields of data are stored for each check: 
amount, check no., date, purpose, recipient and TAX DEDUCTIBLE 
REMINDER. CHECK SEARCH routines allow searching on any of these data 
fields. Routines are also provided for CHECK SORT by date and ctieck no.. 
DATA EDITING and Report Formats. Up to 100 cliecks/mo, storage 
S39 95 

SAVINGS: Account management system lor up to 20 sepaiale Savings 
accounts. Organizes, files and displays deposits, withdrawals and 
interest earned for each account. Complete records shown via CRT or 
printer S14.95 

CREDIT CARD: Gel Control of your credit cards with this program 
Organizes, stores and displays purchases, payments and service charges 
for up to 20 separate cards Use lor credit cards or bank loans, CRT or 
printer reports S14-95 

UNIVERSAL COMPUTING MACHINE: $49.95 ® 

A user programmable computing system structured around a 50 row x 50 
column table. User defines row and column names and equations forming a 
unique computing machine. Table cfements can be mulliplied, divided, 
subtracted or adrJed lo any ottiei element. User can define repeated 
functions common to row or column greatly simplifying table setup. 
Hundreds ot unigue computing machines can be defined, used and stored, 
and recalled, with or without old data, for later use. Excellent for sales 
forecasts, engineering design analysis, budgets, inventory lists, income 
statements, production planning, project cost estimates-in short for any 
planning, analysis or reporting problenr that can by solved with a table. 
Unique curser commands allow you to move to any element, change its 
value and immediately see the effect on other table values. Entire table can 
be printed by machine pages luser-defined 3-5 columnsi on a 40 column 
printer. 

COLOR CALENDAR: $29,95® 

Got a busy calendar? Organize it with Color Calendar, Whether it's 
birthdays, appointments, business meetings or a regular office schedule, 
this program is (he perfect way to schedule your activities 
The calendar display is a beautiful HI-RES color graphics calendar of the 
selected monlh with each scheduled day highlighted in color. Using the 
daily schedule, you can review any day o( the month and schedule an event 
or activity in any one of 20 time slols from B:00 A.M. to 5:30 PM. Your 
description can be up lo 20 characters long. The system will also print out 
hard copies on your minimum 40-column printer. 

BUSINESS SOFTWARE: Entire Series S159.95 (A) ® 

MICROACCOUNTAHT: The ideal accounting system for small businesses 
Based on classic T-accounts and double-entry booking, this efficieni 
program provides a ledger journal for recording postmg and reviewing up 
to 1.000 transactions per month lo any one of 300 accounts. The program 
produces CRT and printer reports covering: 
Transaction Journal Balance Sheet 

Accounts Ledgers Income and Expense Statement 

Includes a sliorl primer on Financial Accounting. Requires 48K Ram 

S49.95 

UNIVERSAL BUSINESS MACHINE: This program is designed to Slf^PLIFY 

and SAVE TIME tor the serious businessman who must periodically 

Analyze, Plan and Estimate, The program was created using our Universal 

Computing Machine and it is programmed to provide the following planning 

and forecasting tools. 

CASH FLOW ANALYSIS SALES FORECASTER 

PROFORMA PROFIT & LOSS SOURCE AND USE OF FUNDS 

PROFORMA BALANCE SHEET JOB COST ESTIIWATOR 

REAL ESTATE INVESTfWENT INVENTORY ANALYSIS 

Price, including a copy of the Universal Computing Macfiine 389.95 



TRS»80 ® 

BUSINESS CHECK REHISTER AND flUDGET: Our Check Register and Budget 
programs expanded to include up lo 50 budgetable items and up to 400 
checks per month. Includes bank statement reconciling and automatic 
check search |48K) 849.95 

ELECTRONICS SERIES: Entire Series S259.95 

LOGIC SIMULATOR: SAVE TIME AND MONEY. Simulate your digital logic 
circuits before you build them. CMOS, TTL. or whatever, if its digital logic, 
this piogram can handle it. The program is an interactive, menu driven, 
full-fledged logic simulator capable of simulating the bit-time response of a 
logic network to user-specifted input patterns. It will handle up to 1000 
gates, including NANDS. NORS. INVERTERS. FLIP-FLOPS. SHIFT REGISTERS. 
COUNTERS and user-dBfined MACROS. UP to 40 user-defined random, or 
binary input patterns. Simulation results displayed on CRT or prmter. 
Accepts network descriptions from keyboard or from LOGIC DESIGNER for 
simulation S15995 (A)lj) 

LOGIC DESIGNER: Interactive HI-RES Graphics program for designing drgital 
logic system. A menu driven series of keyboard commands allow you to 
draw directly on the screen up to 15ditferent gate types, including lOgate 
shape patterns supplied with the program and 5 reserved for user 
specification Standard patterns supplied are NAND. NOR. INVERTER. EX- 
OR. T-FLOP. JK-FLOP. D-FLOP, RS-FLOP. 4 BIT COUNTER and N-BIT SHIFT 
REGISTER User interconnects gates |ust as you would normally draw using 
line graphics commands. Network descriptions far LOGIC SIIVIULATOR 
generated simultaneously with the CRT diagram being drawn. S159.95 (J) 

MANUAL AND DEMO DISK: Instruction Manual and demo disk illustrating 
capabilities of both programs S29,95 

MATHEMATICS SERIES: Entire Series $49.95 (A) 

STATISTICAL ANALYSIS I: This menu driven program performs LINEAR 
REGRESSION analysis, determines the mean, standard deviation and plots 
the frequency distribution of user-supplied data sets. Printer. Disk, I/O 
routines 819.95 

NUMEfflCAL ANALYSIS: HI-RES 2-Dimensional plot of any function. 
Automatic scaling. At your option, the program will plot the function, plot 
the INTEGRAL, plot the DERIVATIVE, determine the ROOTS. MAXIfVIA. 
MINIMA. INTEGRAL VALUE S19.95 

MATRIX: A general purpose, menu driven program for determining the 
INVERSE and DETERIVIINANTot any matrix, as well as the SOLUTION lo any 
set of SIMULTANEOUS LINEAR EQUATIONS 819.95 

3-D SURFACE PLOTTER: Explore the ELEGANCE and BEAUTY ot fVIATHE- 
MATICS by creating HI-RES PLOTS of 3-dimensional surfaces from any 
3-variable equation. Disk save and lecall routines for plols. Menu driven to 
vary surface parameters Hidden line or transparent plotting . . . S19.95 

ACTION AOVENTURE GAMES: Entire Series $28.95 ® 

RED BARON: Can you outfly the RED BARON? This fast action game 
simulates a machine-gun DOGFIGHT between your WORLD WAR I BI-PLANE 
and the barons You can LOOP. DIVE, BANK or CLIMB-and so can the 
BARON In HI-RES graphics 814.95 

BATTLE Df MIDWAY: You are in command ot the USS. HORNETS' DIVE- 
BOMBER squadron. Your targets are the Aircraft carriers. Al<agt. Soryu and 
Kaga You must fly your way through ZEROS and AA FIRE to make your 
DIVE-BOMB run. In HI-RES graphics S14.95 

FREE CATALDG-AII programs are supplied on disk and run on Apple II 
w/Disk & Applesoft ROM Card & TRS-80 Level II and require 32K RAM unless 
otherwise noted. Detailed instructions included. Orders shipped within 5 
days. Card users include card number Add S1.50 postage and handling 
with each order, California residents add 5' .'".osales tax. Foreign orders add 
S5.G0 postage and handling. 




SPECTRUM SOFTWARE 

142 Carlow, P.O. Box 2084 
Sunnyvale, CA 94087 



FOR PHONE ORDERS: (408| 738-4387 
DEALER INQUIRIES INVITED. 




m 



COMPUTE! 



March. 1981. Issue lO. 



The Monitor and the Three Kinds of Numbers 

It is important in learning M.L. programming to 
grasp a distinction between the three ways that the 
computer could see any number. Depending on the 
context, it will think that a given number is either a 
datum, an address, or instruction (a task it should 
perform, such as fetching something). To illustrate 
this distinction, we can construct a simple, but very 
common, M.L, routine using the PET M.L. Moni- 
tor. (If you have another computer, the addresses 
where you locate this experiment and the address of 
your screen RAM might diiCer, but all our 
6502-based machines use the same M.L. instruction 
set). To enter the monitor, we must SYS to any ad- 
dress in the PET which contains a zero. There is 
always a zero at address 1024 so we can type SYS 
1024 and the PET will display the "registers" and 
the cursor will land beside a dot, indicating that the 
monitor is available for our commands. 

Let's ignore the register, and simply notice that 
the fourth number listed is under an "ac" which 
means that, at this time, the "accumulator" in the 
6502 chip contains this number. For a long time, I 
wondered which addresses in the PET contained the 
accumulator, the x register and the y register. They 
are actually unique and not part of the RAM or 
ROM memory as such. These registers are stopping 
places for data as it streams from one place to 
another, from one actual memory cell to another. 
But on to the experiment. 

We will put the letter "A" on the screen. 
Following the dot, type: 

.m 0360 370 (this asks for the numbers between 

these hex addresses) 
Then, when the numbers appear, type in these new 
numbers right over the ones on the screen; 

.0360 A9 41 8D 00 80 00 (we have written a 
complete action for PET with this, so hit the return 
key to let the monitor enter these new hex numbers 
in place of the old ones). If your monitor types a 
"?" then you have made an error where the "?" 
appears on the line. Try again. 

What have we got here? When the PET is told 
to start with the instruction A9 it will load the next 
number in our sequence into the accumulator. That 
will be the 41. Then it looks at the 8D which tells it 
that the following two numbers (00 80) are the ad- 
dress to store what is in the accumulator so it puts 
the 41 at address 8000 (which is hex for the first cell 
on the screen — and an "A" will appear there. How 
did 00 80 get changed into 8000? You just have to 
get used to it. An address is read into the computer 
LSB (least significant byte) first, followed by the 
MSB (most significant byte). 

The last number we entered was the 00. This is 
hex for 0, and it is called a "break" which was the 
way we got into the monitor with our SYS 1024. In 
this case, when fmshed printing our "A", it will 
come upon our break instruction. Now type: .g 0360 



(which means go to 3060 and do what it says there). 
The "A" will appear and the monitor will come 
back on showing its registers. Notice what is in the 
"ac". You can print any other letter by increasing 
the value where the 41 is. To return to the BASIC 
mode, type an "x". 

This example, so simple, is just how the com- 
plex tasks are performed by the computer — one 
thing at a time (but fast). Organize enough of these 
segments and you have BASIC, or FORTRAN, or 
any other "higher" language. Look at the two OO's 
we used. They represent two different types of 
numbers which are context-defined in the computer. 
Since the first 00 followed an instruction (8D) which 
said put the "A" here, the computer knew that this 
00 was the less important part of an address and the 
next number it found would be the MSB of that 
same address. Having finished that job, it asks, what 
next? The next number can never be an address or a 
datum. It must be an instruction to the computer, so 
the 00 in this position is the instruction "break." A 
number can only be cither a datum, an address, or 
an instruction. Of these three possibilities, the com- 
puter knows how to interpret a number by the "syn- 
tax" (the relative position to other numbers in the 
sequence). This is exactly how we know what some- 
one means when they say "TOO TOO" on the 
phone, as in "My little girl is two today." 

So, our "41" can translate three ways: datum 
— the actual number (or what that number means in 
a code, "A" in the ASCII standard translation 
system); 2. address — the 41st (65th in decimal) ad- 
dress cell in the computer; 3. instruction — please 
exclusive — or the number located in the cell pointed 
to by the address in the first 256 bytes as offset by 
the X register. (Before you are alarmed, there is very 
little chance that you will ever use this particular in- 
struction with this addressing mode in your entire life.) 

M.L or Assembly Language 

What we have just done is the most cU'im-ntal level 
of coding next to flipping switches for each bit in 
each byte. We have entered our code a byte at a 
time using hex humbers. But this is slaw. And, since 
numbers are so abstract, they arc hard to remember. 
The term "mnemonic" means "memory helper" 
and this is the next step up. Simple toggle switch or 
hex programming is usually called "machine level" 
or "machine language" programming. If you use a 
three-letter mnemonic instead of A9 to help you 
remember that this loads the accumulator, things will 
be easier. LDA means load the "ac", BRK stands 
for break, and STA means store "ac", and so forth. 
There are 55 mnemonics, one for each task that our 
6502 can perform. However, some of them arc so 
rarely used that you can easily copy down the main 
ones and learn the strange ones later if you want. 
Most everything can be done with about 20 of them. 
or course, the computer will not understand 



March. 1981 Issue lO. 



COMPUTE! 



23 



SPECIAL 



Additional 10% off on all CBM hardware 



INTRODUCING OCT DA OD IT OR 

ROM rC 1 nMDDI 1 CASSETTE 

The PET RABBIT contains high-speed cassette routines, 
auto-repeat key feature, memory test, decimal to hex, hex 
to decimal, and other features. Coexists with the BASIC 
PROGRAMMERS TOOLKIT. Works with 3.0 ROMS 
(New) and new style cassette deck. 

Cassette versions configured for SI 800, S3000, $3800, 
S7000, and S7800. (3.0 ROMS only| 
Cassette and manual ~ $29.95 

ROM version configured to plug into P.C. board at SAOOO. 
(Specify 3,0 or 4.0 ROMS) 
ROM and manual -$49.95 

FREE ROM RABBIT with purchase of 8K PET and tape 

deck. 

SPECIAL - ROM RABBIT and cassette deck --only $134.95 


EHS IS NOW A 
COMMODORE DEALER 

EHS offers a number of software products for PET, ATARI, 
APPLE, and other 6502 computers. Now we sell CBM 
hardware. If you're in the market for PET products, be 
sure to look for our FREE software offers. Note: Be sure 
and deduct 10%. 

CBM PRODUCT DESCRIPTIOIM PRICE 

4001 -3KN 8K RAM-Graphics Keyboard $795.00 
4001-32KM 32K RAM-Graphics Keyboard $1295.00 
8032 32K RAM8OC0I.-4.OO/S S1795.00 
2022 Tractor Feed Printer S 795.00 
4040 Dual Floppy-343K-DOS 2.1 S1295.00 
8050 Dual Floppy-974K-DOS 2.0 $1695.00 
C2N Cassette External Cassette Drive S 95.00 
CBM to IEEE CBM to 1st IEEE Peripheral $ 39.95 
IEEE to IEEE CBM to 2nd IEEE Peripheral S 49.95 
8010 IEEE 300 Baud Modem 8 395.00 
2.0 DOS DOS Upgrade for 2040 $ 80.00 
4.0 O/S 0/S Upgrade for 40 Column S 110.00 
VIC Computer New Commodore S Call or Write 

EDUCATIONAL DISCOUNTS 

BUY 2 - GET 1 FREE 


MACRO ASSEMBLER >^ 

AND -V V' 

TEXT EDITOR ^^^ 

Macro and conditional assembly, string search and replace, 
10 char./label, AUTO line numbering. MOVE, COPY, 
DELETE, NUMBER, and much more 20^- commands, and 
20-1- pseudo ops, 

PET cassette version (ASSM/TEDI - S49.95. 

(Specify 2.0, 3.0, or 4.0 ROMS.) 

PET disk version (MAE) - S169.95 

(Specify 3.0, 4.0, or 8032) 

ATARI cassette version with machine language monitor - 

S53.95 

FREE ASSM/TED and ROM RABBIT with purchase of 
32K PET and cassette deck. 

FREE MAE with purchase of 32K PET and disk drive. 


TRAP 65 

TRAP 65 prevents the 6502 from execulting unimplemented 
instructions. Have you ever had your system to crash on a 
bad upcode? This is a real machine language debugging tool 
and time saver. Also useful for teaching trap vectoring and 
extension of instruction set in schools. 3% X 4% printed 
circuit board which plugs into 6502 socket of any PET, 
APPLE, SYM. Only S149.95. 


ATARI M.L. MONITOR 

Load and save binary data on cassette. Display and change 
6502 registers. Will coexist with BASIC. Monitor uses the 
screen editing capabilities of the ATARI to allow easy use. 
Cassette and manual - $9.95 (specify memory size), 

ATARI MEMORY TEST 

When you purchase a new ATARI or add on new RAM 
modules, you need to be sure that the memory is working 
properly. (Remember, you only have a short guarantee on 
your memory!) Cassette and manual - $6.95. 


TINY-C FOR PET 

An adaptation of the TINY-C interpreter sold by Tiny-C 
Assoc. Useful for learning a modern structured programming 
language. Diskette - S50.00. Owners manual - S50.00 

FREE MAE and TINY-C with purchase of 32K PET, disk 
drive, and printer. 


COMPILERS 

Graphics Drawing Compiler for PET and SYM. Works with 
Macro ASSM/TED. The GDC is composed of a number of 
macros which emulate a high-level graphics drawing language. 
In addition to the macros, GDC provides some very useful 
enhancements to the ASSM/TED. Manual and Cassette - 
529.95. 

Music and Sound Composer for PET. Works with Macro 
ASSM/ TED. The MSC is composed of a number of macros 
which emulate a high-level computer music language. In 
addition to the macros, MSC provides some very useful 
enhancements to the ASSM/TED. Manual and Cassette ■ 
$29.95. 


APPLE PRODUCTS 

Macro ASSM/TED — includes manual, on cassette — 

S49.95, on disk - $55.95 

Apple MAE - similar to PET MAE. A powerful assembly 

development system on diskette for 48K APPLE II or plus. 

(Requires license agreement) — $169.95. 

PIG PEN - 100% M.L. word processor for use with Apple 

ASSM/TED. Fast text formatting, vertical and horizontal 

margins, right and left justification, centering, titles, foots, 

shapes, etc. Manual and source included, on cassette — 

S40.00, on diskette - S45.00 

Apple Mail List System. Provides sorting on zip code or 
last name. Approximately 1000 names/diskette. Manual 
and Diskette - S34.95. 


I/O KIT 

PET 1/0 Experimenters Kit. Allows easy access to IEEE or 
user port for the construction of external circuits. Kit - 
S39.95. 


EASTERN HOUSE SOFTWARE 

3239 Linda Drive, Winston-Salem, N.C. 27106 

Ph. Orders - 9-4 EST (919) 924-2889 

After 4 pm 748-8846 

Send SASEfor free catalog 


ORDERING TERMS 

Senrl check or mnnev order in U.S. dollars. Add 2% foi 
postacie for CBM orders. Overseas software orders add 
S5.00. All software mailed free in USA and Canada. 
Purchase oiders acc6[)table. 



24 



COMPUTE! 



March. 1981, Issue lO. 



LDA. It only reads numbers, so you will use a pro- 
gram which lets you emer the LDA, but pokes A9 
(actually it hands the PET a decimal number and 
BASIC takes it down to the binary level for you.) 
The program which gives BASIC a translation of 
your LDA is called an assembler, hence assembly 
language or assembly programming. The terms 
M.L. and assembly language are used inter- 
changeably, though, and both refer to an entry of 
code in the same way that the computer will later 
follow it, byte by byte. 

Using the M.L. Routines from BASiC 

In many cases, you can use a routine in the BASIC 
code by finding its starting address with a map and 
then examining it with a disassembler (a program 
which looks at the raw numbers and translates them 
back into mnemonics). Then you can just JMP 
(jump) or JSR 0*^™? 'o subroutine) from your M.L. 
program directly into BASIC'S M.L. code. 

If you are programming in BASIC itself, life is 
simple, but execution of your program can be too 
slow. To use our example, if you wanted to print an 
"A" from BASIC you would type! PRINT "HA" 
and the tompuler would put a 41 into the ac- 
cumulator and jump to 65490 where an all-purpose 
routine for outputting a byte is located in the BASIC 
ROM. You could also do this with an M.L. routine 
by typing: 0360 A9 41 20 D2 FF 00 (The 20 is JSR 
and the FFD2 is hex for 65490). 

But this, too, is slow. After landing in the 
BASIC ROMs, the first thing that PET does is a 
jump to another address where it determines that you 
mean to send the "A" to the screen and not to the 
tape or a printer. Then it flys down to a "vector" at 
address OOBO which is rather like a corner shot in 
pool — when it gets here it just picks up another ad- 
dress and goes back up into ROM memory pretty 
close to where it jumped from. And so on. Since 
BASIC must do all kinds of jobs, it is more general 
than any routine you program in M.L. yourself. It 
has to check many parameters before acting to send 
your "A" to the screen. So, often, you will want to 
save time and code in M.L. yourself. Using routines 
from the BASIC ROM also requires that you know 
what these routines expect as preconditions. That 
output routine will print whatever is in the ac- 
cumulator, so you must have loaded it already with 
the character wanted. 

To give another example, you can print a large 
decimal number to the screen (as in scorekeeping 
during a game) by a JSR to CF83 (in BASIC 4.0), 
but you must already have placed the LSB of that 
number in the X register and the MSB in the ac- 
cumulator. If you want to experiment with this, go 
into the monitor and when the registers show on the 
screen, type over the number in the "ac" and the 
number in the "xr" with the MSB & LSB of the 
number you want to have printed. Typing return 



will change these registers. Then: .0360 20 83 CF 00 
.g 0360 

What you are doing here is entering BASIC 
where it prints line numbers on the screen during a 
LIST, but you are going in and out of that particular 
area without using any other aspect of that code. 
Trying to set up this sort of printout would be un- 
necessary and time-consuming if you tried to do it 
yourself. So, in this case, we are happy to "borrow" 
some already programmed M.L. routines from the 
BASIC ROM. 

M.L. or BASiC— Whicii Is best? 

Often, BASIC is best. It is easier to program and 
easier to debug (fix errors). Whole tasks can be left 
to the computer which you would have to carefully 
program in M.L. code. And BASIC uses a language 
which is crypto-English. At least lor the beginner, 
PEEK is easier to relate to than LDA. 

M.L. code, when you RUN a program, will 
often enter never-never-land — an endless loop 
which you cannot get out of without turning off the 
computer and destroying the program. There are 
"warm" resets which you can add to the PET which 
will exit such a loop and leave your program intact. 
One helpful technique is to fill the memory area that 
you are coding with zeros before you start. Then, if 
something goes awry, you might land on a zero 
which, as a BRK instruction, will safely send the 



PROGRESSIVE COMPUTER SOFTWARE, INC. 

405 Corbin Rd., York, Pa. 17403 
(717)845-4954 

Invites You To 

STEP INTO THE WORLD 

OF MACHINE LANGUAGE 

PROGRAMMING 

with 

TEMA 2 

Thy most pmvL'rful machine lan|,;iKi>;L' dt'buyging 
ttiol ever licvcioped for Ihe APPLti 11. Debug 
machint' languaf^e as easily as BASIC. 

• FIf.xible instruction set 

• Command input syntax edilor 

• Totally invi.siblu to the user pro>;ram 

• Complete, in-depth documentation 

• Unique, PCS standard, self-paced 

• Trainer program 

• For 3.2 or 3.3 DOS 

I'Vi' ifH'cinlizr in sustvius and tiiipHctiliou hunlwivv 
for HDE mid APPLE pioducls. 



March. 19B1. Issue lO, 



COMPUTE! 



27 



NEECO announces the MIPLOT Plotter from WATANABE 



MIPLOTWX4671 




i CodfUASCIIl 


^4a^Tw 1 Furvciiort 




D 


tJHAW Dmw iiirjijl'i! I'l-:*- t"; ihi*' [KJirt ipecifietJ by itfloluto coordinaiw 


1 
i 

E 

s 

1 


1 


RELATIVE DRAW O'Jw >i suai^liT line sc th* ftoini specHied by relaitwecoordirvslei 


M 


MOVE Wavtv^jn p^r. uD ID The fromt specified bvatMolulecoordlnatw. 


R 


HELATIVE MOVE , Move win pen up lo ihe point sDecified bv relative cocTdinaiw. 


L 


LINE TYPE 


SpCCiry solid or broken lina. 


a 


LINE SCALE 


Sp«Hv |h« pitch of ftbfokBfi line tO.l - 12.7mml. 


X 


AXIS 


Draw X or V coorclmaiP aicil. 


H 


HOME 


Reiurn to iheorigL«i i^iih tti« p^^ up, 




s 


ALPHA SCALE 


Specify c-wracier sire ( 1 to (6 liRWi batiQ Jmm x D.4mml 





ALPHA ROTATE 


Specjfv cnaracier orientation. (Four dtrectiam) 


p 


PRINT 


Draw ASCI 1 code Gharscteri, 


N 


MARK 


Draw mark cEPtterod on the pen position, [Six kinds! 



• 26 cm X 36 cm Plotting area 

• ,1 mm Addressing Resolution 

• Full ASCII In any of 15 different 
character sizes 

• Uses standard felt tip pens 



«1 250.00* 

•Includes interface lo CBM, Atari " , Apple, or 
TRS'SO**. Please specify. 

Please CALL or WRITE for 
specifications and information. 

'^ Atari is a registered trademark 

**TRS»80 is a registered trademark o( Tandy Corp. 



ORIGINAL 8K PET 2001* OWNERS TAKE NOTE! 



The following peripherals and accessories are IN STOCK AT NEECO: 

Complete PET graphics 



1. AXIOM PRINTER 




• Plug compatible 

• Electrostatic paper ^29d 00 

• 40 or 80 columns 



2. 16or24KEXPANDAMEM 




INTERNAL MEMORY 
EXPANSION UNIT 



• Plug compatible 

• Dynamic low heat memory 

• Proven reliability 

• No adaptor needed 



16K- '299.00 
24K-*379.00 



3. FULL SIZE KEYBOARD 



I I r ■ T ) 1 ; t f i 

titiitifrr ■ 

- iiiTieJf-T- 

• «» : i ■ 



• Complete PET graphics 

• Separate keypad 

• Plug compatible 

• With cover 



«99.95 



■8K-200( with original l<eyboard and built-in cassette 



NEECO 

879 HIGHLAND AVE. 
NEEDHAM, MA 02194 



NEW ENGLAND ELECTRONICS CO., INC. 

"NEW E NGLAN D's Largest 

Computer Showroom" 



(617) 449-1760 

ti^ASTERCHARGE OH VISA ACCEPTED 
TELEX NUMBER 951021. NEECO 

MON-FRI. 9:00-5:30. E.S.T. 



28 



COMPUTEI 



March, 1981, Issue lO. 



Computer 
Communica- 
tions 
Experiments 

Mofvin L De Jong 

Department of Mothemotics-Physics 

The School of the Ozorks 

Pt. Lookout, MO 

I. Introduction 

This article describes a RS-232C interface circuit for 
serial input/output that can be used with any com- 
puter peripheral that uses such an interface. In this 
instance, the peripheral is a modem (NOVATION 
CAT) that can be used to transmit and receive data 
over telephone lines. Many modems require a RS- 
232C interface, hence the need for the circuit which 
in turn uses a 6551 ACIA (Asynchronous Com- 
munication Interface Adapter). The purpose of 
publishing this work is to find one or more persons 
who would be willing to experiment with computer 
communications over telephone lines. The article also 
describes some very simple software that can be used 
with a modem to transmit and receive messages over 
telephone lines. Later, more sophisticated load and 
dump routines can be written to transfer large 
amounts of data and/or programs from one user to 
another. 

A true confession is that I am a beginner in the 
area of computer communications, and I would like 
to try some simple experiments before I fork-up a big 
subscription fee to one of the networks, only to find 
that my equipment or my understanding is inade- 
quate. If you can obtain the necessary equipment 
and if you are in roughly the same position, write me 
a letter when you have said equipment operating and 
we will try to arrange a time to try our hardware and 
software on a telephone link. I might add that the 
software and hardware described here have not been 
tested, except in the "TEST" mode on my modem, 
in which case everything worked properly. I am 
aware that my routines are simple and slow, and I 
would welcome suggestions for improvement. 

II. Circuits And Things 

I sometimes wonder if there are any hardware en- 
thusiasts like myself out there. You might let your 
editor/publisher know of your interests. My hardware 
fan club seems to be the null set, judging from the 
amount of mail I get. But here is another circuit 
even if no one ever builds it. You can always buy an 



RS-232C interface anyway. The circuit is shown in 
Figure 1. It consists of three integrated circuits, a 
6551 ACIA, a MC1489 RS-232 line receiver, and a 
MC1483 RS-232 line driver. The latter two circuits 
change the RS-232 signal levels to TTL levels, and 
TTL level signals to RS-232 signal levels, respec- 
tively. The 6551 ACIA operates at TTL levels (5 
volts is logic one, zero volts is logic zero), while the 
modem operates at RS-232C signal levels (see 
Michael E. Day's RS232 Communications in COM- 
PUTE!, September/October 1980, page 26). The 
power connections for the MC1488 and 1489 devices 
are given in Table 1. 

Table 1. Power Connections for the RS-232 line driver 
and line receiver. 

Pin 7 = GND 



MCI488 Pin 1 = 


- 12V 


Pin 14 = + 12V 


MC1489 Pin 14 = 


+ 5V 


Pin 7 = GND 



The connections to the left of the 6551 ACIA are 
made to the user's microcomputer system. Most of 
the signals are standard 6502 system bus signals, and 
require no explanation. Thus, address lines A0 and 
Al are used to address the four registers of the 6551, 
and are connected to the register-select pins RS0 and 
RSI. (You will probably want to obtain a specifica- 
tion sheet from either Rockwell or Synertek when 
you get your 6551; in fact, I advise you not to build 
the circuit without a spec sheet.) The data bus con- 
nections are shown in Figure 1 , as well as several of 
the 6502 control lines (R/W, 0,„ RES, TRQ). A 
1.8432 MHz crystal is also required. Still referring to 
the connections on the left-hand side of the 6551 in 
Figure 1, we are left with pins CS0 and CSl, the 
chip selects. 




.M|\'AT10V CAT 
MDDF.M 



Figure I. Circuit for the 6502-to-RS-232C-to-Modem interface. 



DYNACOMP 

Quality software for* : 



ATARI 

PET 

APPLE n Plus 



TRS-80 (Level I!)* 
NORTH STAR 
CP/M 8" Disk 



GAMES, SIMULATIONS, EDUCATION and 
MISCFXLANEOUS 

BHIIX^K 2.0 {A>atJablc fur kII campulErs) Price SII.K C^ssftH/Sll.VS tHskf ei» 

An <ll iiwiil^iK vriiion of Ihk mate po^ijlai i^r facd {SJiiri. Tlin rio|'4i» bDlh BIP^ 4nd PLAY^ n[3iR iiantcicl or diipLcilrbndgF 

Drpmdinf on iht cgniim-i. your ;o9nput<i OTWCMnli ■"fU nihw pl*y IH* eTrfntt OR drfeon- If vpu tud (wj fcijh, ihcnirripytr "ii! 
d!iut>>r v"ut ctintiic)' BRtrKF Z prmi^ rKiEi'miinf mnlkinrnml hit idvincttf rlirri *m] ii aq tmntnl Itvnint ioqI Toe i^r 

11 KARTS t,S (AvRllp&k im ill campylm) Prke: f1<I.H C«M(Ct/S1I.H HKhrlk 

AnrKitint irJ wrrii'iiiri r5im;'(nrf .<Tvpfiii'ifiJi t«"rui«f (iiJiArK Mrim M4 irKt-otiminlfiindn ».Si«h ihr pijipai< n not in 
itkf int h{iir^> LV ihf qucrr e( iii4tln PIj)' ifiFnii li^e nynpwrr i^ppciMru) mthO uc wmnl itiih iM'd in froi pUtint i^fifiiri 

STlfP FOKKB (ATARI onljj Prtcf i Hl,« C*i«He/S]5.»S ntilrii, 

ttviiiv-the-cUit'i: iinbic'i cf-d t4<nc. TiHrcomswmJinIithC'nrdioncMiunc«ndTm(uu] th4'cara[iuE(Tjbnon>'i^: !«j t«« T^r 

\Kt v">V*'^ r*"* M<k4<i< »J>^ 'viB 9n » itK ATARI. Cotw. fnphtc), I4v4d 

POKER PARTY iAniltblr forill ranpnlen) Price: SIT.HCHrtw/Sll.K Dskcllr 

POktBi PARrH LI ■ dii* [»1fi umulaSum hivd on Ihf book. HllitR. bf OiaiU tKot^ Thti.ei.1hc moil imi]xdV:nv>i iciuiM 
tiulfHi I'X' nKTn«Bpj.tnii Dw pwt> (mnntir d )0||tift! *nd Mi oaSri Itcrapwirri iilafni. EuA el dmc ;tli>cn Ui-ou mil [ct Is 
knot* ili|rTV|h|ii«.tl>|(rrnl rnrwiubly inirif r^im of 4 HvriBt fB^i^mAy E^bkifTn fakl undrr inniuir. Pr&iim «rib POkEH PAR 
IV htfwr innf l"> lli»i n.wniiiT Hme tmeih)' ft^ffk l'*iii*ilt ind diikfUrtfrnKmi cpiviic a V; K |o> Ui^fi] AnJr II 

V At.PI:/. (Avallible for lU rompiilen^ ?ricf ! *U,»S C«»ti«t/$1>.»S Dhkmf 

A :k>»iLiiiiuii(<liyptittnkn' nuiMi'fn tP 'ht Piin*« Will"iimS(>uniJ»inl V«ld4( N4rri^|. 1lHrtPir4in tf>n »nct(aMiif ;*fiXIM?ic- 
t3>cn! rj4!iT mdrpi'viJ rniplrryi rfiifiirtlnwJElicIihpptnKiiM iPJ iiJilwitrrm (Tiiti \w vn eoifrii<!l«(nui'ihi[>»niiirbeTj.iril. 
Tie. An)' iiiidird irimiiul ma> bi jwd for d.!p]j> 

FLIGHT SIMULATOR (AvuMBble forsH compiitm) ?rke; SII.K C»Mtir'Sl].!l5 Dbkellr 

A rckllniu uidtiirnHVE iniiiKmiii;!! lunulLiKin c^riikt-orc. Elithi iTid lind?i>|.. The proftim uiili/'Ci icrmlvnuiicniLaliwii tai ihc 
i:liiruicHiikioFi tnl.urluil. Ytnj.cuipruOn-iucrii.mait ipiHiMClifi ind nivi|iiiiin uvxnt rjdiili ■ndcamcuiihndinp. Thceratc 
■dvifiLtd n^Ti CU1 ilio perform Iixi[ki. hiir-roLi uid limjlir jcrot4[ic m>rKu>cTt 

CRISBAGI^ 2.11 (TR^-U only) priet: }N.^ c««Mt»/SlR,9S Dhkni* 

TKi| It .(vrll^JtrilgiHid &ni| nifrly riKi>[rd likij hfn^l^ vfriJtin of Bhf (Lu^K t*id k*^"*.'i'i^^t' l^i< Mrivieil^.E p^ogiim ft^ iJlc Erib- 
bMC [I'iin' irtwiuiih nl * wpf EhiriippMn?ii( m '(U ti She b»lin»t» mifisiii Inlnrn Ihf umr. in p^rlifulfi thf Kticinxin4 iwpM The 
ii»ptlii'iJvtiM«(r'K'Wt t*«4rda«<:inl4ovinTi>^*'>V ihtief o| rhrdiiciliy luE|litir«ihr IKS'tO'i mp}fiacapibil4iKi|. a-ithihrc^iifi. 
ihcr"v uBd«<nriiih PwnHPimin *ui™B*iic»ly ■«OMn vi ii.\o vvourxei ihr pwrni iivn* Ihf r)'44iiior4l pBT^in. 

CHKSft M A!iTER (Nortik Slir ind fRS-H onl)) Prtct: %\9.9i Cuheu/SU.K DhbMW 

Thil (i)nipicit»Bfl>eo pmnrfiJ proirMn prmiio Hit k^tii !i( f<U> [I IBdvIrk f«iJlini,.tii puuBI ai[SuiB cad tht piamotiois cf 
piwni AddiiMuuDv.ihrbo^fdnt) bc;rr'nn hfncibciuntij'pli^. pciim]iiiet|E^'mniiiuiic«pf "bccti"ptiii To ETbLUtniM etku- 
liijG (fnd.thr irOfiuTi ic^iLlIni iEi.uHTrifa!i ^ugiujir (In ^Fm ARE SPECIAL l$f^ Af f'aLifonul. Fitj] (nptuiiiir oci^crjnl lo 
|h( TKli-B •*»!«. ■uJ l»o -aidlbi. ol jiphinum^ [.: iJnpUT wr PfmiJfd *" »«orsnioj4lr North !ilii ujo' 



5TARTREK 3.2 1 ATillablc for ■]] curapulrn) 

Thtt n Ihf fl#i.*t( SIvtrrt mihiLiUdii. hu\ »ita icv>rf«l nc* (Hlviti Jw fu 
*AiB4ng vhiir lUo jiLIwkins ilajham tn tfctfirr ^OMarflnl^ T^ KliiiJ;oni alio i 



!^PACK TILT lApjtlr qdM 

Lwllvr ft^itfajUiti Id Iil[ 1^14 r>UD«{llUM TV u 
ihViLlfi t,f\a vai-Wt' A hjili'ifi iijritr lUitKi you i 



PTkn: 1^ 1.H Cumih/SU.K Dtakem 

nplr. Ihf KEinfOfli no* ilhool al Iht £Eilin[in4c siEhEmE 
lEKk lailh hD4hli|ftl jaJ t«i>r crtiixtLUul mA^tr'arKn 
iLWriinJ^ Mi/TiMf J O.S jirf«iirt!TVklinii?»mrt 



Prtcr: S1D.K C*Hr[ic/S]4.45 tHifcni* 
i^fftr Sfljrid iimj**? 'Jfti wtwft chiholrt^u 



GAMES PACK I (AtflJIablt for all coapgicn) 

CAME:^ Pack I tiinikilii ihr tla^^h i^t>m[niln ^m» dI' BI AChJ 



Prk«: SD.K Cuwtti/SIJ.K WdnlU 
trK. tUNAk Lander, fkAPS, mojiserace, swiTCk and 

c ta.it In iLudrnj l:^C7 are tAdJridualLir Kcnud by a tai^^nirnl 



(JAMES PACK II (AviJIit&lf ronll compulm) Print S9.*S CuHiir/SI3.95 Phk^tti 

LAMLSPAttcniTKtiMkufM liiwCKAZTIICHrS. JOnO. ACEY I»LtIT. LIKt. WUMPLS *rjl c*hri Ai ■-'ib UAMtS 

PACK I. all ii<E |iinn vt lokilcd ii >?nc nepain ti>d arr cxllfil li^n .■ ihiil 

WIi» pai fT«1 (o mat pn n»I"n olvn 701 can hat* nr N ACOM P (oIlRtHn lot |<iil M«^' 

N0MIN01':S JIGSAW fTRS-SO only) Pik«: SIfi.fS Cuwiu 520.^ ni>Vrii< 

!VOUINnf^Iir>^AVi riAnUvi:tviiinj:iKlu;iiAiilKil«lfrapriicil]iuutr Tbi j ^uv iloani]) df *4h; 4 tiAUd (U.IIu:.i ' :-'■■-. 
dcnnl) (hmcn iliapn lEHnimcin). □E' ■•inch IIhtc «r 60 Ejpcn.. R; kmaitij IhaE Ehr tbjpn ehliI be bt^t!) iEriiTietEel. i.-.: ^ i..r--.-f 
1M ^b^TT af .pA^'b Imalifca. alElbc qooudofs icav BvnTnluaB> ;MiKnJ ^pfinf n baifd ssn Ibr Dumbo' of jur^^Q icq^jirJ i.rJ '.''? J ' 



rrin: IM.'M Cnrilc/S 14.95 INskrilt 
J Huieio^hi Dthrf Hov«<«f,tb«au«iidriuiu»ll]r 
Du l>w Aian BIEtHHlt IOaie»dl( {Ot Mi<t| bit fcrl * '**^ 



MOVING MAZE (Appk oalji ) 

ItlllVlNCiMAf'L n^f>laiikEht|«rtin[iitUin9JditHla|>u(k HtHi » 
(and landnirJ)) huj^l aul li (EwtiAuaUi hoflf »initirtrJ Thr i^t^ln 
Siwinf II b; ui rUpLTd liDIC iltJi.-BIiW, and Ifltt li^ili cit [dai arc pii?tdnl 

BLACK HOLi; (Appk atAy\ rrt»:SM.H Candir/Sia.H DULriic 

Inii nair nciun| j.itiMictt tLmiiUiidAolmc lUiifelcnii ihrcrhnliii [ji»irl| oriutiihj;* biwk hblcakth I iiP>Ktfr»bt Thieobitci iiis 

riilciahJ nUin.ai.iii, lc>l a jircwribrd Sjincan orbjl [Imr Eo a unall blu k hijit Thii »Il> be a<hi«v»d vltn.euI'Ci^iliil'g to (mt tllcUliirjl> 
IFu.t Ihr Eid^l sJmiilntriiyi Ihr pra-at. ConErodof Ihc^AfE i| rc«lr|<tC4llr iiniLjl^Er^ uuitl lajc jcEi Put rtrlaEicn anctiEain IbtiulDa Tui 

KirdndKin Ihn fup|riin miliar!. Hi'Rn E!tp4iin iivd ii rduMimril n <«(ll ii chiEtcnrni. 



TEACHER'S PKT I (Atallabk for all compulm) 

1b|< Ii lh( fiiii cil OVNA< OMP't cdu.^jlwinal ru'kiir^ ITim^rily ii 
yuuri itudrnl *ilh (oiiniing firitlur. lirElp.wmiJ rnofntiqn «njj ll 



Pr1c»; S 9.'K Cuu<it''S15.V5 [>t»k«iir 

[trH)r<l(Mr rrruJiiullaKrad^]. TEA{:HFH'!i.PET!9tiiidciETir 
.« kttk ol ni»ih iVill nrti«' 



CRVSTAIJi (ATARI only) Frir»:t ?.»CnKtlr^lIl.V5t>Mcllr 

A uriqvf ilpuiilim ' ■ ndd^rril t [I'^^ucn [lumitirf f laphici ifhpUvi Kcwn^unrd M^ih i[>m i^tiiK/h >ir) i% r)tc piiEoRi ir< huili V> 
ICO pallcrnt a'r ibi tamt. jnj The iOintk^Md iIEki cI the lound u>J fiafMlKi. an in«)nH(iim| CRYSTALS )i» bnn ukiI in \-xt\ 
iliCirc' in d<!r(*t>ira!{ <^c >Aur<i jnj t^iv ^aurn ol Ehr Ae.iii 

CRANSTO.N MA,\OR AWVKNTURE (North Slir anijt) Prkr: SW,95 

Ai Uii' A [onpnhrnwtc Aitvonurc pnc fcr Ehc Nwih Suf ClANTTOK MANOft ADVENTtJRE uka )ioa mw wirHtrioui 
CaASSTO^ MANOR «Wrc]iau AEi^spt u (iifccT fslMlaitkireMBici .Luikiof is ihcDUDararcwiUiajsuhxHi ri»bcuvln wj] res\ 
|ii( u|i thrErcMiim Hiiliauc a fifht. T^mmbenDTTaaDH isptu-tt ind ilMUKKutMi dnciiptimi irramdi axn 
liiiitDi pcftuLar wtn of Adtcniiut ptotftan.. im*kin| ihn (tm the icp in id cUiii Pbi) ua be ucfpcd u ixj t 






: Riv».i 



SORTU STAR SnfTWABE K XCHANCE ISSSEI LrBRARY 

lirsa<{ iiMI- n^'-m diiitihjrn itu AJ ■ .i-Eumf nSM IjNaff . Mdiiof hhc^i diikrii'ft nlPn in »u 



Availability 



h N^tuMC wfi»*i« n ■.upflrfJ vi!h coi 
BufiaMi «alrun«iiinin lbK.pri>|:uniri£r 
lHS«I|l«<>4lll)UdAF<fllf fAFfil^UlfEIU 
loullp. truKt [HOfBiTi tiB be oblainn] >[ 



( /( r 'ffli It. 7PS ^' 



ipIitrdccLmcnUEjQn :oncijr.in| ticu f (fUiTmiiuni mJ <umplei L'rim oilier* iu ipKJHciil.i]] 
Of) iptcf l,ATAR.Wn|tiiirii.:4ki bi>({'i ^iweBScai.pf^tiuiuAEeattiUbtaoa aTaRI, P£T. 
.U»lrilldAikTErcai'Bcl]uNtalbSuJu«-|Uil(«l4l>ldout(kd<fi.ul} fMBpalitiIr}'di^cl1r. Addi- 
1 lUndiil (I&U !»nuE} V CP'M Flopn iliikl. fia i)tEnni niniuni lasls MfiASIC 



BUSINESS and UTILITIES 



MAIL l.t»T II (Appit ■nil .Mmli SlirdiikHIti onJi! 

Thu mtr-i IriitH''^ ctatitm nr» iivludn lutt alphihcEic iirvd iipi 
dtlinrdcDdr. (|i«»l munrDr fipCodt TtriifiBlimitlorniaEmUt™! 
iHui MW«ntT!»iti>xlid<iithtf NodHSiir oi Aroit IXlli ? I; o' 



rrtn:tM.H 

Hit unlLri ti *tl ai fiJt ntifLBi Enl/incan h rmioKl E>| uke- 
bc jHcriitfKUid kifcaddjcu I4KI1. EuAdiiiinccia uorcm.Hr 
n Jiaa «iih dcubk dif^ui) Nmeh S:4I cr Appk Dfy; 1 it" 



FORM LEnrrEll SYSTEM (FLS) (Appli asd NdHIl Sludbk>l»OBl}> Prin^SLl.H 

I LS ma> be Dnpta>nl. lo imcralf i[ul]vulual[> uldirunl fotia letltft. TntuKl' ^TCXtn thMddlEII Tlk JXld upuUrir COmpOKI Ihc k1- 
■.tr I IS »ilJ Ihrn print forrn IHIrii uiing nch addrni. FL5 li tORiplrEtly IORipj:jbll *^lth MAIL LIST II. vKk): mi}' bc WKd rg 



LtMAIl. MST II 



<irh«vd PH:ki|.c fot IJ'F.tl 



TKXT SPITOR I (Ulter Wrl(«r| 

An r*!> IH uw. liB( ^n-miifij i(i)i rfiuT *hij,ii pts>viJr<i laiiabi 
(lulril for compDiim Lnlri^ fniE it qiiEic capabk dI Jiandlin| n 

P»:t($ONAL FINANCE SYSTEM (ATARI oolr) 

FTS t> a uoiJr duticwtRiocisiird irslm tDtnisincd ot lOprofj 

incliidt i W> !T»B.iicii™ ^pKU}. fail aesfn, ;s cpii 
iiponi. chnk'book b«Ui>nni: bv niph c^oiiini «u3 



Phcc: SM.H CuMllr^'ill.H IXikrIlr 

nr v.bdEti) mini tifhiplf pulitrtph ladnjnf Ttiii irit ntiloi li. ninlh 
h IkfiTf jvCl Atkibtblr Icf 4ilc<Mitpuliii. 

F^ricc: tM.99 Hdctk 
I deiiiHii la «|iauc uid iicipLr^ jtnir pcnout f runm Ff*ium 
(Mini, dala frCfidll bj rcaailk,. cwU DC IM.>h: ii^iunuj pnnlicif ^1 

6 :jh auciic ii aTaM DOS Z. 






FISDIT INorth S«»r oolj) PTf«:$if .» 

Thtiu i ElhrR-tB-OTE pfa|T■ffv'■^Kh minitOM infiOfPi^m" #«c™b*bT krynoiili ofltrcclrl^l: FWiorul ttt l»»i ^*m*>. Ctxrirmr 
cuJlil iiifLrvbeniliiidlllrfEr™™ Jt| tMf»nnt»rElrki.rtrP«diJbw«m.WI In addiMilo kcjwoiilicmishei, ihnekf* birihdaj. «n 
iitk«ur> wd irP^il^KiX »ali*«rct Ihr pftwndlm«dt «»d pppomcBicnJ icaiikn !« Ita HnunrrtiaJ tciMdl KtfeiifXt (ttofdi 
arc Konwd bf a ui|k krr>crd ct ^ crnvtrrn-trcind fac-^v ihin krri™")^ 



PTfcr:tLf.H 

aJI filn and p<rD),iBm ih lite u^i ofdilli itt^iC^ iri 
ficiTiidc (ffkicni IcciLinjof ihed?»i'rijril?«r r'" 



PTf«:*II.« 
a BASIC ptDpuni.uiddLipli.)i'i!li< TilrHtnofihrprofriPiiin 
) nunib«(i«l *hKh tiU-iauiliiuddirfcTEncci DczuT. COMPAHl; 
iS« more turitri, and lodeiily IdcnEify Eht chtrt«i Rii>dr djr 



DFILEINpHti.Stiiranl}^ 

Thii handy prcifiini aJlonai pworih Sew ukii ii>iKuri:«jTi »i 
• uubl, b(iimjilaEn DFlLt ii cuy 111 id upcrul uk It *■ 

COMPARE <NonlL SuroolT) 

CQMPAKE naunilediik uEdiEj v^laarr packXp whitti^ 
bnn, lhtltri|thl.iritfrfHlprihf ntunbcrolttalcmfrt linn, 

pniDin IJit LHT lot* inline irniontoI"hii wfi*u? to vrnf' 
ini dnrlopmrnt 

COM PREJ^S (NPhh Slpr only) Pftct: t11.« 

COMPRISE 11 iunifc.^ Ilk iji>Jiiypfi^ftirviahK*T*a*»*fi»llM»uiaetM*l>if*C«i*d|»f«wa*Jlf)SEM«ku*lrmi[ntifiDmSorlh& 
BASIC ivorimi. Ttit Knitct flk 11 procaKd wk knt ii 1 %rm. Ehiw p^iEAiiiiiHt ritj taitt fnetfuiiM W b# compiiiii^d mini £>r]( t 
invail ■ini>ui>t of ciHnputcr iMrrMf?, Flk ooapftiMta of ZtVWit Mf (wmiaaly afluncd 

GRAFIX (TKS-W ob]>) Tiltt: SILM CbkHt/IU.M Dbkcllr 

Tb.imciqiH' prpfifn iUmi jisj Iei buT; cmEc |rmpttK7i dircrEIr IrdOa lh«1lt)tMvd. fott "dn.»''''>ixic TifUJC isiof tbc Tftipini'l n- 
WtlVLvtfurm nnuciii QiifcUicEisiirrusudc.i1 ii ■.ulomaliollji atifiMdcd EOjesU EaSIC p[i>fruE u 1 it.-ia[ ''I.'iit4c . Dra* I "hi?- 
n ftcr'*. call i| Hl«ad cSen pnn: n finn roui iprnsraai uvni PKIVT HS' iSii lII >tf)' cu> *i!i to ZTeUc and u^c (Tiph'Ti 

TlbV (TR&JO dbItI Price: ltO.H Caorllc'SII.H Dbkcllr 

TEDV n an aucmb^ tanfufr jHOfrain vhith alidivi Ttni iCi wiuTititi the Lnci in jtiHir BASIC pnrfcanii. TIDY altc rmp^rt v" 
nRnuii> ipa^^n jj%d RFMark tlalrmentik Thf (null ii a EMii|1>*Ci*d lASIC profiiJii <*tvi<c:K LiMi mocb kii B>cnwryspKTiBd nnvirk 
iijn.fKriil) Utl" Ohc Uiajinl. TIDY irnuini In nem^T. )C<u .mtl ki«d tAI nun^ ul lASIC prctfjuni i>iE}K>ul bivin| id rtloid 



STATISTICS and ENGINEERING 

DATA SMOOTHER (NoL ivailibk f«r ATARI) Prin: SM.VJ CnK(((/SI4.« Dbkttc* 

Thn ipeiiil dala imcuLMeij: ptE^llim rrllr »utn) tciapiiily ilHUt JMful mlcMtridoii Iram rcii* buiinni ■■twiri1iln«siP| daU "bub 
ur equally i.pKnl' Thcicruale (EaEurn (^Dieiin d«|IH iAdi rir|« i>( riS.iiwtll at imnolhcd rm and KCOnd d(Tiriiiv( uEcuUliun 
Atio mduJcid ii auEiLrmjEti: pd^l1>(1| Oj' ibf lltpul. dkll aral IFTiM^ESciJ IctulEI 

FOURItJl ANALYZER (At altabit (or til eonputtn) Prtc«: SI4.« Cnrftt/f tl.t5 VMAttu 

Uk ihr'; jKuiiajn luiLuniEw tiit fiei;ucrjct i[Mi:ira ailmi:cd duiaEion ii|ruh Thrncfrin Inturn auicmiit Ktl^nt ^luj plaiEinf ef 
lb* iti-tmi dala add Snjlii PlttfikUl tppliniiiaii-i incEjdtEbf aratjitiol nxTiplitalid pallfintjn huih Tiddl liElR1'prii4.i. cciniinijrKt' 
lii^m lEid baiincvi 

TEA CTraeufcr FaDdJoa Anaijici) Price: Sl4.« CnKtIc/S23.« DbkrfCt 

fumiujii thru itipaau id pulicd iaputi. TFA ii 1 cnajw mt>dirRciiii«fi cf FOL'illEP ANALYZER *nd opKiatni u fnimccrLiii 
w>>cn((d dMj.b«l •erijilDf-fiifqufncTjiiotuvril ai diticdiEinf rnij^n. Whetnt FC^JRIER ANALYZER it dniirv^ fm nluutHmal 
lAd K^tftiifhi btt. TFa 1.14a tcfixiKrTni ek>I AitaLatk lot all (tnip^icn 

HARMON IC ANALYZER (Avillibk Im ill compytm) tikt; SU.tS C»wri(/;zi.f$ Dtakric* 

HARMr'i'iiLi. ASAiyZFR -u, iktifiud (or ibr irciEiuT inaliiii ul icrniiiir ^t^rt<?rmi Fewtfn. incbjiSf tilt fdt tcnnaiion, 
«d>iin| *f>J lEMattrfirif'-aJ u ocLI ai dala hnd iprdium ptollinf Ok pttlKulallr uB^guC lkril:ir ii. |)<*1 ibr iBmi data need noCbr 
it^tuJIr ifALedoi in order Thconfina] iIiej 11 KMicdusdirubKipliiK intcriwItiKiniiuvnl tccrtA'ritrdtli Eik'n't'cdbii i!h ti r 

FOL'atJiR A^'ALYZ£R.TFAuld HARMOKIC ANALYZE tC Mar be puEChkted ICtnhff Th ACCFinbincd pri«af 144 45 lElirK u- 
IWtftl «niJ Ije »5 |:hr« diitoEnI 



Pric«:StV.93 CasKttt/SU.H DbkrEtc 
u«r*i "iwJjnaErLir'curstfitiifii piofi-a^. Fuurnm- 
(lire Ikterrul libriEi' of riiiini fkirfEioct: diEa rditint: 
, fi>ittii.lii>ri<Mrru:iiini, c^cJandnucimDrt In addl- 
uEity Ihe tiXnernlCMfit^laniilt ■T^j'dlta ui4t]rli.«iiU}fl- 



REGRESSIO.^ I (Aviitabk for all conipu1cra> 

REflRt^^lON litiLniiiLe j.rd FicriTtiarulJ; vrr^jlieDrc dimEn»[Fi^al kl 
(llrfr ft bllh acstuaci; an autDmalic decree dftcrminallon opEJeH; ail 
iUlpmtlit itt* ind Wi^r TiloKini; a i4«Ei|lK«l analpli |ri: ilanla^d driLi 
i»n, (»cw fill m4j bf (r Irf ■Hhcut Kwilmni bhe dan. PEtiHt55lON I u. 

RECRtii&SiaN II (PARAFIT) (Avtilibit ri>r all compnlrn) ?tkt- St9.«3 C*umi«/SU.h Dhktiic 

J'ARaI II III itUiiitd to handk Ihoir aui in #1»ib \M p*nmttm ire i^nboMM [KWt<lT n^nJinr«i>t] m |br ritiBi ri;n.-liDn Tbe 
^lxtt itmpl^ iitriili \Yt lunclicul lanB. UKtudinf IJW pftruonm (Aid, AfU, <nc.]i|i1 ftot mot^ BA5fC ttalcrarat Iinn l^la and 
ttiuJ:i mjr M iUTLruUtcd iaJ pj«iid u mlh REGRE^STOS I Uk HECHtS-SIOS r Tor potrnomul muni.fndS'AIAFIT fen lh«e 

MULTILINEAR REGRESSION (MLR) (Avalltbk for til contpHtcn) i^kr:S(9.95CMP«iit 

MLRit ipialfiiiHulHrtiititpKkatEliCKutityaPtiiaiaKiiconEuniniiBOH cvort liinnrh indn^ndnu itmMn B?u4rit>r'riM'ni 

IBi ttw htiK r<4ifi4)ori.uWUiio(i.. ihii pi:[>fj»ni ilto p<r>td« my tii uh dtia mtir.iiMifT.rtt'r>t^il tnd niiHi fuaciuwti In addi 

l««i, Itwttiff mty tn:trrotKt llHicriiitKHi b) ittpphnil >a]uci la ihr imiTfwniimi iih^Hn Tht numbtr pI ttt4Nri»n4:daia lur h 

Lmii«d orJ]! b) ii« *itiltbk RwiMn. 

KtCiJlli!HON t. II u«d MULTIUWEAH KtORC3AIOf< ru> bf pi'"'f«i«'' itieil-fi iw IM »1 [iMrt iaiwcltii m WI « iitiif* 

cki!tiiin>. 

BASIC SClENTtHC SUBROIiTINtS, Volum* 1 (Not avallibk (Or ATARI) 
DYNACOMP II IJHHI.-IMH.C dunituicr [o> ihrwri*«r< krjrti<^ibf t(.i a^S/rSrw^ii^r a^ftfoLitj. 
(i« tht KYIb^MfCriO' HiU jd'etEiKCrifnE in SYTL mifUilK'. Jinwi* m 11 ThtV HLbroutinci bavc Scce uvmbtnl ucoidini la 
chiptef . Isduded Hiiti erch n^llKtion ii ± ircnM profram liliicti irl<CEi knd dcrrefltlfiiti rKh lubiounnr. 
Cplktuar »l: Chgpim 3 Wd ^ Dma anij fui;t>on plEillinj. (OErplel »AftaUn 

CalltEiion H\ Cctaptn *. Mxirii atid ittiM ^iwjihc^ni 

CDlbmior 1' Chicnm 5 xnd 6 Rind«n nvnbtr imeriiw!. tCKi ^mnalniltpai 
Pim [W coHnrtisn. (14 95 CuK9.Ef/SI».Sl IMilnx 
All ibm (ciIlKEimit 4ir*iiil4bE< t»r I!<l>] itb-tr (jiiriinl and t4l.«t l^ihM dtikMEM) 

. SA51C itmiiflc SaUVMimn rn^v-r I ii ivulabtr rio<T' DYNACOMP 1-x 

ROOTS (AktJltbk for rII compalm) Piitc ».99 CasMm/S13,»S Ptokrtu 

tn « EbEihcil. KOars itmiiluDEO'iiir.i^tcnm.DciLEliteziiDnof i-poljr-^n^IhtMPi rul corffKrcmi Tbctc -a m litril onibt dnrn 
ol EM [>al)iuoiji!. aj'.l t^ojic ib« prtxiinit n iicnliit. LSt ^L'lTjTK'y ti ftnTi^li 'cry (cod So in^Eu] f-joia arc rrquircd ai inru'. 
a.-M iru ."AEtuUi-n: rAXi tit ibK::itiied h*ii into iht po^ritomid a-.d' tS< rciidLaJi djpla)cd. 



w/b>F RiiHkdeiChil 



Ordering Infarmafion 



Add li.a te diiLfltc pncc lor I" Happy diik ilBM Icrmix »fE mlMitf. CP/M. PvbrfMali BASICli 
'IRS-JO diilierin arc fVf uDPlicd >iiH DOS ot BASTC 

l>tdtict 10% whfn ordering 3 or more programs. 



1 fi>i Jnaikd dnai; 



It tiT ib<M tihl oihci jroiitmi from 



DYNACOMP, Inc. 

6 Rippingate Road Depi. E 

Pittsford, New York 14S34 

24 hour mail order phone; (716)586-7579 

Ofncc phone <9AM-5PM EST); (716)442-8960 

S.. \«ti Ml* llrf<<»U flMM .44 T^ SYA wki Ul. 



30 



COMPUTEI 



March, 1981. Issue lO. 



The chip select pins must be controlled by the 
address decoding circuitry in your microcomputer 
system, or else you must add your own address 
decoding circuitry to produce the chip select pulses. 
Since I have an AIM 65 system, I used one of the 
device selects available on the expansion connector, 
namely DS9. This signal is active at logic zero for 
any address in the range $9000 to $9FFF. It was tied 
to CSl, the active-low chip select. If CS0 is tied to 
+ 5V, then the registers on the 6551 are selected by 
any address of the form $9XX0 to $9XX3 where 
XX is a "don't care" number. Thus, in the pro- 
grams you will find the four 6551 registers selected 
by addresses $9400 to $9403. If y ou hav e a SYM-1 
you can make use of device select DS18. If you have 
an Apple you must provide your own decoding cir- 
cuitry. The reason lies in the fact that the device 
select pulses generated by the Apple for the 
peripheral cards have been logically ANDED with 
0„, and consequently they do not become active early 
enough in either the READ or WRITE cycles to 
work with 6500 family devices. For a discussion of 
address decoding see De Jong's '" book. The circuits 
are generally quite simple. In the case of the Apple, I 
suggest trying an inverter and a 74133 to generate a 
device pul.se for say $C08X, and perhaps a 74LS245 
as a data bus buffer. Try an inverted 0, to replace 
02, My familiarity with the PET does not justify sug- 
gesting any circuits, but I am sure the 6551 can be 
interfaced to a PET. 

We turn next to the signals on the right-hand 
side of the 6551 as it is shown in Figure 1. The RXC 
input to the 6551 is the easiest to explain because it 
is not used in this application. The remaining pins 
have labels that are almost identical to the RS-232C 
designations. In fact, the only one that is different is 
the DCD which is simply CD (Carrier Detect) in 
RS-232C lingo, Again, refer to references (2) and (3) 
for a more complete explanation of the RS-232C in- 
terface. 

Although the signal designations on the 6551 
ACIA are almost identical to the RS-232C labels, the 
signal levels are not, and some arrangement must be 
made to transform the TTL levels of the 6551 to the 
RS-232C signal levels. We chose to use integrated 
circuits designed expressly for that task, namely the 
1488 and the 1489 line driver and line receiver. Note 
that the 1488 requires a positive and negative supply 
voltage as well as ground. Also, the RS-232C ground 
(pin 7 on the DB-225 connector) should have the 
same ground as the 1488 and the 1489. The connec- 
tions in Figure 1 that are found on the right-hand 
side of the figure made up a rather complete RS- 
232C serial interface that may be used to interface to 
a variety of peripheral devices. Furthermore, the fact 
that the data format and Baud rate of the 6551 are 
under the programmer's control makes this an ex- 
tremely flexible RS-232C interface. 

Since computer communication by telephone is 



the subject of this article, a modem is required. 
There are a variety of modems with RS-232C inter- 
faces on the market and we do not wish to make any 
recommendations about them. I purchased a Nova- 
tion Cat because that appears to be one of the more 
popular devices. Skyles Electric Works and other 
advertisers in COMPUTE[ offer modems for sale. In 
any case, my Novation Cat requires the signals 
designated in Figure 1 in addition to the signal 
ground. Other modems may require the DTR and 
RTS signals so we have shown the correct TTL-to- 
RS-232C interface in the event you may need these 
signals. 

This completes our description of the circuit and 
we turn next to a simple program that is supposed to 
allow communication to take place using the 6551 
ACIA. 

Ill, A Simple Communications Program 

A program that was designed to allow two people to 
communicate over telephone lines with their com- 
puters is given in Listing 1 and a flowchart is shown 
in Figure 2. This program is very simple and very 
slow, and it is offered here merely as a way to test 
the circuit, the program, and the modem. Eventual- 
ly, one would want to construct more elaborate 
routines to transfer information quickly. Our interest 
here is in experimenting for the sake of learning. 
Hence there is no necessity for encryption devices, 
bells, whistles or even parity checks. 

Here is how it is supposed to work. The caller 
loads the program and places his modem in the 
originate mode with fuU-dupiex operation selected. 
He loads the indirect jump location with the vector 
$0F13 so that after the program is begun, his program 
will go to the transmit loop. 

He makes the telephone call to an anxiously 
awaiting friend who also has this interface and this 
program operating. The friend has loaded the in- 
direct jump location at $0000 and $0001 with the 
vector S0F26 (remember, $26 goes in $0000 and 
$0F goes in $0001). The I'ricnd has also jilaced his 
modem in the answer mode with full-duplex opera- 
tion selected. After an informal chat, both friends 
put their modems into action by placing the handset 
into the muffs (assuming acoustic modems). The 
originator begins to type a message. 

He ends his part of the message with an 'EOT' 
character (Control D on your keyboard). While he is 
transmitting, the friend's program echoes the 
message back to the originator where it is read and 
printed by the computer. It's nice to see what you 
have said, and to know that it got where it was going 
with no mistakes. When an 'EOT' character is sent, 
it automatically transfers the originator's program to 
the receive loop and the receiver's program to the 
send loop, giving him a chance to retaliate. Having 
made no visible symbol to indicate when this 
changeover takes place, may I suggest sending a 



Morch. 1981 Issue lO. 



COMPUTEf 



GIFTS FROM PROMETHEUS 

NEW for APPLE M 

Advanced products at^ 
Down-to-Earth 

PRICES 




DUAL SERIAL CARD-1 

All functions of two 
independent serial 
cards on one board- plus 
more. Provides Apple II'" users 
witti two simultaneous asynchro- 
nous serial channels. DSC-1 appears 
as two separate logical serial cards to 
the Apple ll'^l Fully software 
compatible with all Apple ll's'" and 
Microsoft software. 2716 EPROM 
used for easy driver modification. In 
addition, the second serial channel 
supports these extra features: 
• Strapable DCE/DTE. • Secondary 
RS-232 handshake functions (DCD, 
DTR, DSR) • Strapable logical slot 
location and hardware looks like it's another 
slot. Order: PP-DSC-1 @ S189.00 each 

DUAL SERIAL/PARALLEL CARD-1. As with the Dual Serial Card-1 

(above), (he Dual Serial/Parallel-1 provides Apple users with simultaneous 
use of one full serial port and one parallel port. Both ports strapable for 
any Apple peripheral slot. Fully compatible with all Apple and Softcard 
(CP/M) software. Drivers for serial interface and Centronics parallel 
interface are contained in modifiable industry standard EPROM. Serial 
port is configured like DSC-1 . Order: PP-DSP-1 @ S189.00 each. 

MEMORY EXPANSION MODULE-1. Expand yourApple ll<'>to afull64K 
RAM system with highest quality 16K dynamic RAMS. Fully buffered to 
provide reliable operation - even with fully loaded Apples. Total compati- 
bility with Microsoft Softcard'^'/CP/M'^' and all Apple software. Supplied 
complete with installation instoictions and test program. 

Order: PP-MEM-1 @ SI 49.50 each. 
PASCAL MT+ MEM-1. A modular native Z-80 code Pascal compiler. 
ISO standard. Includes a MEM-1 (detailed above). Have a full Pascal 
compiler at half the Apple price. Requires a Microsoft Softcard"^' and two 
disk drives. Note that the Pascal MT-f alone is normally S250.00. 

Order: PP-PMT-1 @ $299.00 each. 

16K RAM ADD-ON KITS. For TRS-80 and Apple ll<". Eight (8) full- 
specification industry standard 16K RAMS. These are not seconds. 

Order: PP-RAK-16 @ $29.00 each. 

Ail Promettieus boards are completely tested and burned-in prior to shipment. 
One-year warranty covers parts and labor. MONEY BACK GUARANTEE: Order 
now wittiout risk. Boards may be returned, in good condition, after up to 10 days 
of trial for a full and prompt cash refund. California: add 6% tax; BART Counties, 
6V2%. Orders under SI 50, add S3-00 postage, for handling charge. 
Freight allowed on orders over SI 50. Dealer inquiries invited. 
Quantity discounts available. 

PROMETHEUS 

PROMETHEUS PRODUCTS INCORPORATED 

4509 Thompson Ct. • Fremont, CA 94538 • (415)791-0266 

Registered Traffe Marks: (1) Apple Compulere, Inc. (?) Microsoft Consumer Producls (3) Digital Research. Inc. 




32 



COMPUTE! 



March, 1961 Issue 10. 



Listing 1. An Experimental Conimunications Routine. 



$0F00 A9 OB START 

0F02 8D 02 94 
0F05 A9 13 

0F07 8D 03 94 

OFOA 78 
OFOB D8 
OFOC EA 
OFOD AD 01 94 
OFIO 6C 00 00 

0F13 20 3C E9 TXLOOP 

0F16 20 FO OF 

0F19 C9 04 

OFIB FO 09 

OFID 20 EO OF 

0F2O 20 7A E9 

0F23 18 

0F24 90 ED 

0F26 20 EO OF RXLOOP 

0F29 C9 04 

0F2B FO E6 
0F2D 20 FO OF 
0F30 20 7A E9 

0F33 18 
0F34 90 FO 

Subroutines 



LDA #S13 

STA CNTRG 

SEI 

CLD 

NOP 

LDA STATUS 



JSR KYBD 
JSR TXMIT 
CMP #"EOT' 



JSR RCVDAT 
JSR OUTPUT 
CLC 



OFEO AD 01 94 


RCVDAT 


LDA STATUS 


0FE3 29 08 




AND n08 


0FE5 FO F9 




BEQ RCVDAT 


0FE7 AD 00 94 




LDA RCVRG 


OFEA 60 




RTS 


OFFO 48 


TXMIT 


PHA 


OFFl AD 01 94 


WAIT 


LDA STATUS 


0FF4 29 10 




AND #$10 


0FF6 FO F9 




BEQ WAIT 


0FF8 68 




PLA 


0FF9 8D 00 94 




STA TMTRG 


OFFC 60 




RTS 



LDA #SOB Initialize the 6551 by loading the 

command 
STA CMNDRG register (see 6551 spec sheet for 

details). 

Load the control register for 8-bit 

word 

length and Baud rate of 110. 

Prevent interrupts. 

Clear decimal mode. 

A mistake of mine. 

Clear any interrupts on the 65.') 1. 
JMP (THERE) Jump to transmit loop to transmit, 

receive 

loop to receive. Get a character 

from the 

keyboard read routine. Send it to 

the 6551 

transmit subroutine. If an "End of 

Transmission" 
BEQ RXLOOP (Control D) is sent, branch to 

receive loop. 

Get the echo from the receive 

subroutine. 

Output it to your own printer to see 

what you 

sent. Force a jump back to 

TXLOOP 
BCC TXLOOP and get another character to send. 
JSR RCVDAT Wait for a character to be sent. 
CMP #'EOT' Is he finished with his transmis- 
sion? 
BEQ TXLOOP Yes, then go to transmit loop. 
JSR TXMIT Echo the character that was sent, 
JSR OUTPUT Output the character to your 

printer. 
CLC Force a jump back to RXLOOP 

BCC RXLOOP and get another character when it is 

sent. 



Read the status register to sec if a 

word 

has been received, otherwise wait 

for one. 

Get the word from the receiver 

register. 

Return to the calling program. 

Save the accumulator temporarily 

Is the transmitter register empty? 

No. Wait until it is. 

Get the character from the stack. 

Store it in the 6551 transmit 

register. 

Return to the calling program. 




IN[TIAUZ£ 
THE 

MSI 



IMllSKCI 

JUMP TO 

\ A LOOP 



CltrCKARACTF-B 
KEOM Kr.V- 
n{lARI>SOb 
HfJtTINF. 



Tlt*>5MIT IT 

KITHTBANSMn 

SVPRULT^INi 



GET ' T.CHt) ' 
mOM RECEIVL 
Sl'ShOLTINF 



PRINT IT 
WITH OtTPLT 
SLBHOLTI.NE 



> 



[;et(:haka( uh 

Wtrjl UK. KIM 

MBiifit riM 





ICHO IT MITM 
TIL*>'SVnT 
SLTlBlJTn.NE 



Figure 2. Flowchart of the 
Transmit/Receive Program. Sec text 
for details. 



question mark, or perhaps there is some CB lingo 
that suggests it is the other person's turn to tallt. If 
all else fails, pick up the handset and holler 
something. Do not change your modem from its 
original answer or originate mode. 

So back and forth the conversation goes. Once 
you have the transmit option in your hands nothing 
can stop you from talking until you send an 'EOT' 
and give your friend a chance to say something. 
Clearly, the program lacks a certain elegance (it may 



not even work, in which case it lacks a whole lot of 
elegance), but maybe it will get some fun started. By 
the way, the originator of the phone call usually gets 
the phone bill. 

Study the flowchart and the program listing. 
The program begins by intitializing the 6551. An 
eight-bit word (TTY compatible) is used, with the 
parity check disabled, and one stop bit is sent. The 
Baud rate chosen here is 110, but it should be possi- 
ble to go to 300 Baud. Both participants must have 



March. 1981. Issue lO. 



COMPUTE! 



33 



the same rate. Next, the program jumps to either the 
receive loop or the transmit loop depending on the 
vector loaded into $0000 and $0001. This was a 
crude way to start, but it should work. 

In the transmit loop the program first waits for 
an input from a keyboard read routine. The address 
in the program belongs to an AIM 65 monitor 
subroutine that returns the ASCII representation of 
the depressed key in the accumulator. This character 
is sent by calling the transmit subroutine which loads 
the 6551 transmit register with the character. The 
6551 takes over and sends the character. The pro- 
gram then waits for the character to be echoed from 
the other telephone and computer. The echoed 
character is printed to make sure that what was sent 
was actually received. Then control returns to the 
keyboard subroutine to wait for the next character to 
be sent. 

In the receive loop the program jumps to the 
receive subroutine that watches the 6551 until a 
character is in the receive data register. If this 
character is an 'EOT' then control goes back to the 
transmit loop and you may begin transmitting. 
Otherwise the received character is immediately 
echoed back to the sender and also printed with your 
OUTPUT routine. Again, the address of the OUT- 
PUT routine in Listing 1 belongs to an AIM 65 
subroutine. Both the KYBD and OUTPUT 
subroutines must be supplied by the user's monitor 
or the user himself, otherwise the program in Listing 
1 is complete. 

While in the transmit loop, the selection of the 
'EOT' character by the sender will automatically 
transfer control out of the transmit loop into the 
receive loop. Note again that no bells or whistles 
have been programmed to occur when you send an 
'EOT' character, so if you are transmitting you bet- 
ter let your friend know you are passing control of 
the system to him. 

So hopefully all this will work. If it doesn't you 
have only me to blame, and I will not assume the 
cost of your labor or your equipment to conduct this 
experiment. Perhaps it would be best if you waited 
until someone else tried it; think it over before you 
take the plunge. 

Besides, my next project is to launch a 6502 
Communications Satellite using dynamite in my back 
yard and you may want to save your money to buy 
shares in that enterprise. 

References 

1. De Jong, Marvin L., Programming & Interfacing the 
6502, With Experiments, Howard W. Sams & Co., 
Inc. Indianapolis, 1980. 

2. Day, Michael E., "RS232 Communications,", 
COMPUTE!, Sept/Oct 1980, 26. 

3. Ciarcia, Steve, "I/O Expansion for the TRS-80," 
BYTE, June 1980, 42. © 



TAKE THE ? OUT 
OF SOFTWARE BUYING 




MICRO CO-OP 




• Objective reviews and comparisons of 
software available for your computer 

• Co-op prices 

Call or write for more information 

and a free Buying Guide/Catalog 

MICRO CO-OP 

Post Office Box 432 

West Chicago, Illinois 60185 

(312)231-0912 

Include your name, address, and the type of computer you own. 



Selectric® Interface System 



HaSILY interfaced to any IBM Sclcctric I, 
II, or 111. 

OTOP spinning your wheels. Letter qual- 
ity at an affordable price. 

C/ONNECTS via Parallel or RS-232. ac- 

coniniodatcs varied handshaking. 



o 

N 



NLY S575 to S599. Dealer inquiries in- 
vited. 

EW design provides added features. 





ESCON Products, Inc. 

12919 Alcosta Blvd. 

San Ramon, Ca., 94583 

(415) 820-1256 



Microcomputer Measurement And 
Control For PET,APPLE,KIM and AIM65 





The world wc live in is full of variables we want to 
measure. These include weighi. temperature, pressure, 
humidity, speed and fluid level. These variables are 
continuous and their values may be represented by a 
voltage. This \oltage is the analog of the physical 
variable. A device which converts a physical, 
mechanical or chemical quantity lo a voltage is called 
a sensor. 

Computers do not understaiid voltages: They 
understand bits. Bits are digital signals. A device 
which converts voltages to bits is an analog-to-digital 
converter. Our AIM 16 (Analog Input Module) is a 16 
input analog-to-digital converter. 

The goal of Connecticut microcomputer in 
designing the uMAC SYSTEMS is to produce easy lo 
use, low cost data acquisition and control modules for 
small computers. These acquisition and control 
modules will include digital input sensing (e.g. 
switches), analog input sensing (e.g. temperature, 
humidity), digital output control (e.g. lamps, motors, 
alarms), and analog output control (e.g. X-Y plotters, 
or oscilloscopes). 

Connectors 

The AIM 16 requires connections to its input port 
(analog inputs) and its output port (computer inter- 
face). The ICON (Input CONnector) is a 20 pin, 
soWer eyelet, edge connector for connecting inputs to 
each of the AlM16's 16 channels. The OCON (Output 
CONnector) is a 20 pin, solder eyelet edge connector 
for connecting the computer's input and output ports 
to the A1M16, 

The MANMODl (MANifold MODule) replaces 
the ICON. It has screw terminals and barrier strips for 
ail 16 inputs for connecting pots, joysticks, voltage 
sources, etc. 

CABLE A24 (24 inch interconnect cable) has an 
interface connector on one end and an OCON 
equivalent on the other. This cable provides connec- 
tions between the uMACSYSTEMS computer inter- 
faces and the AIM 16 or XPANDRl and between the 
XPANDRl and up lo eight AIM 16s. 



Analog Input Module . 

The AIM 16 is a 16 channel analog to digital converter 
designed lo work with most microcornputers. The 
AIM 16 is connected to the host computer through the 
computer's 8 bit input port and 8 bit output port, or 
through one of the uMAC SYSTEMS special inter- 
faces. 

The input voltage range is to 5,12 volts. The in- 
put vohage is convened to a count between and 255 
(tX) and FF hex). Resolution is 20 millivolts per count. 
.Accuracy is O.S'To ± 1 bit. Conversion time is less 
than 100 microseconds per channel. All 16 channels 
can be scanned in less than 1.5 milliseconds. 

Power requirements arc 12 volts DC at 60 ma. 

POWl 

The POWl is the power module for the AIM16. One 
POVS'l supplies enough power for one A1M16, one 
.MANMODl, sixteen sensors, one XPANDRl and one 
computer interface. The POWl comes in an American 
version (POWl a) for 110 VAC and in a European ver- 
sion (POWl e) for 230 VAC. 




"^"^ TEMPSENS ^.f, 



This module provides two temperature probes for use 
by the AIM16. This module should be used with the 
MANMODl for ease of hookup. The MANMODl 
will support up to 16 probes (eight TEMPSENS 
inodulcs). Resolution for each probe is TF. 




Remote Controller- 
Clock and Calendar 

AN INEXPENSIVE CONTROL 
SOLUTION FOR 
HOME SECURITY • ENERGY CON- 
SERVATION • GREENHOUSES 

• ENVIRONMENTAL CONTROL 

• INDUSTRIAL CONTROL 

• LABORATORIES 

SUPER X-10 MOD SPECS 

1. Remote controller 

Controls up to 256 different remote devices by sen- 
ding signals over the house wiring to remote 
modules. Uses BSR remote modules available all 
over the USA (Sears, Radio Shack, etc.). Does not 
require BSR control module. Docs not use sonic 
link. 

2. Clock/calendar 

Time of day - hours, minutes, seconds 

Date - month, day - automatically corrects for 

28,29,30 and 31 day months. Day of (he week. 

3. Digital input/outputs 

8 inputs - TTL levels or switch closures. 

Can be used as a trigger for a stored 

sequence. 
8 outputs - TTL levels 

Power supply included llOVAC only. 

XPANDRl 

The XPANDRl allows up to eiglit Input/Output 
modules to be connected to a computer at one time. 
The XPANDRl is connected to the computer in place 
of the A1M16 or XIO MOD, Up to eight AIM16s or 
seven Aim 16s and one XIO MOD are then connected 
to each of the eight pons provided using a CABLE 
A24 f^or each module. 



For your convenience the A1,M16 and the XIO MOD come as part of a number ol 
sets The minimum confiauraiion for a usable system is the AIM16 Starter Set 1 
which includes one AIM16, one POWl, one ICON and one OCON. The A1M16 
Starter Set 2 includes a MANMODl in place of the ICON, The minimum configura- 
tion for a usable system is the XIO MOD Starter Set which includes one XIO MOD, 



one ICON arid one OCON. These sets require that you have a hardware knowledge 
of your computer and of computer interfacing. 

For simple plug compatible systems we also offer computer interfaces and sets 
for many computers. 



A1M16 ns-oo 

SUPER XIO MOD (1 !0 VAC only) 249.00 

POWla (POWer module- 1 10 VAC) 14.9S 

POWIe (POWcr module-230 VAC) 24,95 

ICON (Input CONnector) 9.95 

OCON (Output CONnector) 9.95 

MANMODl (MANifold MODule) 59,95 

CABLE A24 (24 inch interconnect 

cable) "-^ 

XPANDRl (allows up to 8 Input or 
Output modules to be connected to a 

computer at one time) 59.95 

TEMPSENS2P1 (two temperature probes, 

-10"F to 160°I0 '•'•"S 

LIGHTSENSIPI (light level probe) 89.95 

The following sets include one .■MMie, 
one POWl, one OCON and one ICON. 

A1,M16 Starter Set la {1 10 VAC) 189.00 

AIM16 Starter Set le (230 VAC) 199-00 

All prices and specifications subject 10 change without 
notice. Our JO-day m&ncy back guarantee applies. 



The following sets include one A1MI6, 

one POWl, one OCON and one MANMODL 

AIM16 Starter Set 2a (1 10 VAC) 239.00 

AIM16 Starter Set 2e (230 VAC) 249.00 

The following modules plug into their respective 
computers and, when used with a CABLE A24, 
eliminate the need for custom wiring of the coinputer 
interface, 

PETMOD (Commodore PET) 49.95 

KIMMOD (K1M,SYM) 39.95 

APMOD (APPLE II) 59.95 

TRS-80 MOD (Radio Shack TRS-80) 59.95 

A1M65 MOD (AIM 65) 39.95 

The following sets include one AIM 16, one POWl, one 
MANMODl, one CABLE A24 and one computer inter- 
face module 
PETSETIa (Commodore PET - 

llOVAC) 295,00 

PETSETle (Commodore PET • 

230 VAC) 305,00 



KlMSETla (K1M,SVM,AIM65 - 

1 10 VAC) 285.00 

KlMSETle (K1M,SVM,AIM65 - 

230 VAC) 295.00 

APSETla(APPLE 11-110 VAC) 295.00 

APSETIe(APPLE 11-230 VAC) 305.00 

TRS-80 SETla (Radio Shack TRS-80 - 

1 10 VAC) 295.00 

TRS-80 SETle(Radio Shack TRS-80 - 

230 VAC) 305.00 

AIM65 SETla(AlM65-l 10 VAC) 285.00 

A1M65 SETle(AIM65-230 VAC) 295.00 

The following sets include one XIO MOD, one 
CABLE A24. one ICON and one computer interface 
module. 

PETSET2(Commodore PET) 295.00 

K1MSET2(KIM,SVM) .285.00 

APSET2(APPLE II) 295.00 

TRS-80 SET2 (Radio Shack TRS-80) 295.00 

AiM65 SET2 (A1M65) 285.00 

SUPER XIO MOD/XPANDRI SET2 (if you already 
havca SETl) 295.00 



Printer And Communication Interfaces For The CBM/PET 




SADI Fo"- Serial 

Two-way 

Communication, 

Parallel 

Printers, 

and Serial 

Printers 



ADA1600 • For Parallel NEC 
and Centronics Standard Printers 



SADI - The microprocessor based serial and parallel interface for the 
Commodore PET. SADI allows you to connect your PET lo parallel 
and serial printers, CRT's, modems, acoustic couplers, hard copy ter- 
minals and other computers. The serial and parallel ports are indepen- 
deni allowing the PET lo commutiicate with both peripheral devices 
simultaneously or one at a time. In addition, the RS-232 device can 
communicate with the parallel device. 
Special Features for the PET interface include: 

Conversion to true ASCII both in and out 

Cursor controls and function characters specially printed 

Selectable reversal of upper and lower case 

Addressable - works with other devices 
Special Features for the serial interface include: 

Baud rate selectable from 75 to 96CX) 

Half or full duplex 

32 character buffer 

X-ON, X-OFF automatically sent 

Selectable carriage return delay 
Special Features for the parallel interface include; 

Data strobe - either polarity 

Device ready - either polarity 

Centronics compatible 
Complete with power supply, PET IEEE cable, RS-232 connector, 
parallel port connector and case. Assembled and tested. 

SADIa(IIOVAC)S295 

SADIc {230V AC) S325 



The ADAI600 is a low cost easy to use ititerface for the Commodore Cornpiilcrs. II allows the PET and CUM computers lo use standard Centronics type prinlers (in- 
ciuding the NEC 5530) for improved quality priming. The ADA1600 has a Iwo fool cable which plug.5 into the PET IEEE port. Another IEEE card edge connector is 
provided for connecting disk.s and other peripherals lo the PET. The ADAI600 is addressable and does not tie up the bus. The address is switch selectable. A four foot 
cable with a standard 36 pin Centronics connector is provided. A switch sclect.s upper/lower case, upper/lower case reversed (needed for some Commodore machines) 
and upper case only for clearer program listings. Works with WORDPRO, BASIC and other software. No special programming is required. The case measures 3 1/2 x 
5 3/4 inches. Comes complete, as.sembled and tested, with case and cables. Power is obtained from the printer or an e.Mcrnal power supply may be used. Retail price 
forthc ADAI600isSI29. i .-. .> j i 



ADA1450 • Serial Printer Adapters 



The ADAH50 is a low cost, easy to use serial interface for the Commodore Computers. It allows the PET and CBM computers to use standard serial printers for im- 
proved qualhy printing. The ADA1450 has a two foot cable which plugs into the PET IEEE port. .Another IEEE card edge connector is provided for connecting disks 
and other peripherals to the PET. The ADA1450 is addressable and docs not tic up the bus. The address is switch selectable, A sis foot RS-232 cable is provided with a 
DB25 connector. Pin 3 is data out. Pins 5,6 and 8 act as ready lines lo the printer, Pins 4 and 20 act as ready lines from Ihc printer. These lines can be switched for 
non-standard printers. Baud rate is selectable to 9600 baud, ,A switch selects upper/lower case, upper/lower case reversed (needed for some Commodore machines) and 
upper case only for clearer program listings. Works with WORDPRO, BASIC and other .software. No special programming is required. The case measures 3 1/2 x 5 
3/4 inches. Comes complete, assembled and tested, with case, cables, power supply and soft> are on cassette for graphing functions, formatting data etc. The ADAI450 
has a female DB25 connector at the end of the RS-232 cable for most standard printers. The ADA1450N has a male DB25 at the end of the RS-232 cable for the 
DIABLO serial printers. Retail price for the ADA1450 or I450N is SI 39. 

ADA730 Parallel • For the Centronics 730 and 737 Printers 

The ADA730 i.5 a low com easy to use interlace for the Commodore Computers. It allows Ihc PET and CBM computers lo use Centronics type 730 and 737 prinlers. 
The ADA730 has a two fool cable which plugs into ihe PET IEEE port. Another IEEE card edge connector is provided lor connecting disks and other peripherals to 
the PET. The ADA730 is addressable and doe.s not lie up the bus. The address is switch selectable. A cable with a 36 pin card edge connector is provided. A swiich 
.selects upper/lower coase, upper/lower case reversed (needed for some Commodore machines) and upper case only for clearer program listings. Works with WORD- 
PRO, BASIC and other software. No special programming is required. The case measures 3 i/2 \ 5 3/4 inches. Conies complete, assembled and tested, with case and 
cables. Power is obtained from the printer or an external power supply may be used. Retail price for the ADA is S129, 




%M 







Word Processor 
Program • 

PET Word Processor. On tape - 

S39.50. On disk - 49.50 

For 8K Pets 29.50 

For 16K and 32K Pets 39.50 

Compose and print letters, llycrs, 

ads, manuscripts, etc. Uses disk o 

tape. 30 page manual included. 



ADA400 
RS-232 
To Current 
Loop 
Adapter 



RS-232 to current loop adapter (ADA 400). 

S29.50 

Two circuits - 1 each direction. Run an RS'232 

device off a computer's teletype port or vice 

versa. Optoisolated. 



ADA4005 - Solder Pads 24.50 
ADA400B - Barrier Strips with screw 
terminals 29.50 



In the US order from: Connecticut Microcomputer, Inc. 
34 Del Mar Drive Brook field, CT 06804 (203) 775-4595 
In Canada order from: Batlerie.^ Included, LTD 
71 McCaul St. F6 Toronto, Canada M5T2X1 (416)596-1405 



QUANTITY DESCRIPTION PRICE TOTAL 



SUBTOTAL 



Handling and shipping — add per order 



S3.00 



Foreign orders add lOVc for AIR postage 
Conn, residents add 7% sales tax 



TOTAL ENCLOSED 



NAME 

COMPANY 
ADDRESS 



CITY _ 

STATE . 



VISA O M/C O Expiration date. 
Card number 



.ZIP. 



Mention this magazine and deduct 2% from the TOTAL 




Connecticut microcomputer, Inc. 

34 Del Mar Drive, BrookfieW, CT 06804 
203 775-4595 TWX: 710 456-0052 



36 



COMPUTE! 



March, 1961. Issue lO, 



Basics 

of Light Pen 

Operation 



Robert A. Peck 

Manager, Technical Support to 
Advonced Manufacturing 
Mennorex Corporation 



Manufacturers of personal computers are attempting 
to make the computer more easily accessible to the 
public. In doing so, various means have been tried, 
such as games, simple home budget programs, and 
the like. The entry format for each of these had, for 
the most part, been by means of the keyboard, or a 
game paddle of some kind. 

Just recently, the trend toward light pen 
"menu" selection for ease of data entry has been 
tried. Let's look at the actual techniques which could 
be employed to implement this type of input device 
on a personal computer. The hardware and software 
requirements will be discussed here. The reader, 
after studying these techniques, may be able to con- 
struct a working form of a light pen with as little as 
$5.00 worth of materials. 

First a note about the definition of a light pen. 
It does not emit light . . . rather it is intended to sense 
the light of an illuminated area on the TV monitor 
screen. As a photo-sensitive device, some form of 
output of the light pen will occur as a result of the 
electron beam energizing a portion of the phosphor 
of the screen, thus causing it to glow. 

To clarify this a bit further, the picture on a TV 
screen is not all produced at exactly the same time 
by a single "photo" flashed on the screen. Instead it 
is made up of a single electron beam being swept 
from left to right (and down and up) across the 
screen, with its intensity varied as it sweeps across 
the screen, to form the picture we see, one line at a 
time. In this manner, the sweeping beam produces 
30 or 60 complete pictures per second on the TV 
screen. Our own visual system enables us to perceive 
the screen as though the entire surface of the screen 
was continuously lit, thus forming a complete pic- 
ture. The persistence of the screen, the time it re- 
mains bright after the beam has passed a particular 
location, is minimal for most monitor screens. 

Let's act, for the moment, in the same manner 
that the light pen will act. Imagine, if you will, tak- 



ing a small cylindrical tube and placing it against the 
surface of a fully illuminated TV screen. If we place 
our eyes at the opposite end of this tube, and restrict 
our vision only to what is at the end of the tube and 
not to the rest of the screen, we are in a position to 
make a judgement about what is going on in our 
narrowly restricted view of the world. 

Now we must imagine either that we are able to 
speed up our ability to perceive rapidly the changing 
intensity of the light on the area of the screen in 
front of us or that the beam slows down to our level 
of perception. Either position is ok for our purposes. 

As we are looking into the end of the tube, we 
will notice that there is no light there most of the 
time. Specifically the phosphor will only be lit up ex- 
actly at the time the beam is striking it, and for a 
short time thereafter, based on the persistence of the 
screen. But of course, for the most part, we will be 
kept in the dark. This will be true at any position on 
the surface of the screen. 

Since we know that we have light for a short 
time and dark for the rest of the time, it is a yes-no 
situation and something ideally suited to being 
handled by the computer. So let's give our eyes a 
rest and place a lens and a phototransistor within the 
tube in place of our eye. We know that the 
phototransistor will produce an output when it sees 
the light and no output when the light is absent. 



...a very simple design will 
serve most purposes admirably. 



How complex must the circuit for the phototran- 
sistor be to allow us to make this a useful, reliable 
device? Well, it depends on the type of selection 
which we wish to make in the usage of the light pen. 
We'll soon see that for the largest percentage of 
potential uses, at least at the hobbyist level, a very 
simple design will serve most purposes admirably. 

In order to grasp the significance of the out- 
put/no output capability of the phototransistor, we'll 
next look at the way the computer or its terminal 
device is producing the output display which we are 
seeing on the TV. 

Let's say we have a terminal which can display 
80 columns by 24 tines of usable character positions 
on the monitor screen. In the process of output, the 
scan controller must select, each in turn, line 1 of the 
character memory, then columns 1 , 2, 3, . . . , all the 
way out to column 80, Then it must repeat the line 
scan for as many TV scan lines a character line is 
supposed to take up. Then it will go on to the next 
line of 80 characters, the next, and so forth, going 
back to the beginning again once all 25 lines have 
been displayed. 



SVte&ggjr; 






GRAPHICS 

FOR 80 COLUMN PETS 

The Integrated Visible Memory for the PET 
has now been redesigned for the new 
12" screen 80 column and forthcoming 
40 column PET computers from Com- 
modore. Like earlier MTU units, the 
new K-1 008-43 package mounts inside 
the PET case for total protection. To 
make the power and flexibility of the 
320 by 200 bit mapped pixel graphics 
display easily accessible, we have de- i 
signed the Keyword Graphic Program. 
This adds 45 graphics commands to . 
Commodore BASIC. The image ' 
on the screen was created by the 
program below. If you have been^ 
waiting for easy to use, high -^^ 
resolution graphics for your PET, 
isn't it time you called MTU? 












mfMm);:mmm^ 



■>r!-';«''-;.VvV. 



'•m: 





'm 



ra^B^^K^BB^ 



NOW 80 COLUMN PETS CAN HAVE MTU HIGH RESOLUTION GRAPHICS 



10 VISMEM: CLEAR 

20 P=160: Q=100 

30 XP=144: XR=1. 5*3. 1415927 

40 YP=56: YR=1: ZP=64 

50 XF=XR/XP: YF=YP/YR: ZF=XR/ZP 

60 FOR ZI=-Q TO Q-1 

70 IF ZK-ZP OR ZI>ZP GOTO 150 

80 ZT=ZI*XP/ZP: ZZ=ZI 

90 XL=INT( .5+SQR(XP*XP-ZT*ZT) ) 

100 FOR XI=-XL TO XL 

110 XT=SQR{XI*XI+ZT*ZT)*XF: XX=XI| 

120 YY= (SIN(XT)+.4*SIN{3*XT) ) *YF 

130 GOSUB 170 

140 NEXT XI 

150 NEXT ZI 

160 STOP 

170 X1=XX+ZZ+P 

180 Y1=YY-ZZ+Q 

190 GMODE 1: MOVE XI, Yl: WRPIX 

200 IF Y1=0 GOTO 220 

210 GMODE 2: LINE Xl,Yl-l,Xl,0 

2 20 RETURN 

m 






Hi 



pi 



MySss,K.- 



'"rSjh-^:3; 



'■ ; M^^ ^'^^mM:i- 



Vii>! 



K-1008-43M Manual only $10 

(credited toward purchase) 

K-1 008-43 Complete ready to install package 
$495 



-.h^.' 



§MMiM)iM^iMMMMi 



MASTERCHARGE & VISA accepted 



Write or call today for our full line catalog describing 
all MTU 6502 products, including our high speed 
8" Floppy Disk Controller for up to 4 megabytes of 
PET storage. -^.z.,^ ■ »«„i»;.„ 




.^Micro Technology Unlimited 

r 2806 Hillsborough Street , 
P.O. Box 12106 
Raleigh. NC 27605. U.S.A. 
19191833-1458 .. ■ 



^mm^^m^ 






^m-^ 



38 



COMPUTEl 



Morch, 1981, Issue lO. 



From this, you can see that the scan controller 
will be continuously fetching characters from the 
character memory. Thus the different addresses of 
the different characters will each be available on the 
address bus of the scan controller at the time that 
character is being fetched for output. 

To put it another way, if our character memory 
was set up such that line 1 position 1 represented ad- 
dress of the character memory and line 1 position 
80 represented character address 79, line 2 position 1 
as address 80 and line 25 position 80 as address 
1999, we would then have a specific point of 
reference to use. We now take our light pen and 
place it on the screen directly over one specific 
character position which is, let us say, occupied by a 
single solid block character such as a nonblinking 
cursor. 

Every time the phototransistor sees a light out- 
put on the screen, at the exact time it occurs, the 
scan controller address bus has, on it, the exact ad- 
dress within the scan memory occupied by the 
character which is producing the light output on the 
screen. 

Just as an example of what this address would 
mean to us, consider the following example. Suppose 
that at screen location 400 (first position in line 6) we 
place a cursor character followed by the description .. 
"CHECKBOOK BALANCER" and at location 800 
in the scan memory we placed another cursor 
character labeled "TREK", we can place the light 
pen over the cursor character representing the 
specific program which we wish to have called in 
next and will expect the light pen scan program to 
provide us with the data required to do it. In this 
case when the light pen senses an output, the address 
of either position 400 or 800 will be on the scan posi- 
tion address bus, ready to be picked up for use by 
our program. We know that if our program finds 400 
on the bus, it must next call in the Checkbook Pro- 
gram. Conversely, if it finds 800 on the bus, it must 
retrieve the Startrek Program. 

Now if we wanted to do so, we would add some 
additional hardware to our terminal which would act, 
in association with the phototransistor output, to cap- 
ture the address present on the bus at the time a 
light output is sensed. As an exercise, let's examine 
some of the hardware this would require. 

First we need something to capture the scan ad- 
dress from the controller bus and a way to transfer it 
to the data bus of the computer. A set of three 
74175's could be used here. Each is a 4-bit tri-state 
latch, where the input (capture side) would be con- 
nected to the scan memory data bus and the output 
(storage side) would be connected to the computer 
data bus for later retrieval. The control lines for the 
latches would have to be connected in some manner 
to the light pen through a flip-flop of some kind to 
assure only a single sampling of the address from the 
scan counter per application of the light pen to the 



The best features of this technique 

are the simpiicity of the 

software required and the 

non-critical nature of the 

components of the light pen... 



screen. The tri-state control lines would be connected 
to the address decoders of the computer so that it 
could retrieve any one of the three 4-bit stored parts 
of the scan address after it was triggered. 

It might, at first glance, seem a pretty 
straightforward approach to follow, but let's look at a 
few of the drawbacks. The first would be the critical 
control of the level of light intensity sensed by the 
pen. Specifically, it could possibly be accidentally 
triggered either by an outside .source of light, or by 
the phosphor pcrsistancc (as little as there is) when 
we first place the pen against the surface of the 
screen. In either case, the address we sense on the 
scan control bus does not really represent the actual 
address of the sample point we are trying to isolate. 
This might entail some special circuitry to be added 
to sense only the rising edge of the beam light inten- 
sity, where that rising edge has a specific rise time, 
and therefore not trigger on an outside incandescent 
light source operating on a 60 Hz sine wave. 

To complicate matters further, even though we 
succeeded in developing this type of edge sensitive 
equipment, we still run into some problems with 
fluorescent light sources in the area, in that these 
have a very fast rise time and have a phosphor 
afterglow as well. Both items make the light from the 
fluorescent vary in a manner similar to that of the 
TV screen. Our software could, of course, compen- 
sate for this, but combined with the hardware re- 
quirements, we have selected a really complex task. 
One more area of difficulty, just to mention it here, 
is the inability to accurately sense the difference in 
address locations between two adjacent, or very near- 
ly adjacent, squares on the screen unless special cir- 
cuitry is added for the rise-edge, as described above. 

Fortunately, there is a way to absolutely 
minimize the amount of circuitry needed to establish 
a workable light pen, along with a way to minimize 
the complexity of the software which has to go along 
with it. In addition, the pen needs only to accept a 
source of power and ground from the computer, and 
will need only a single bit input port to operate fully. 
Some manufacturers suggest the use of the same pad- 
dle input for the light pen. Below is described the 
technique which can accomplish this form of opera- 
tion. 

The best features of this technique are the 
simplicity of the software required and the non- 
critical nature of the components of the light pen, as 



March. 1981. Issue lO. 



COMPUTE! 



39 



SORT is u 6502 machine liinguage in-memory sorting algorithm of commercial quality for PET ;incl APPLE owners. Most 
sorts are acconiplishetl in less than a second and large sorts take only a few seconds. The algorithm is a diminishing increment 
insertion sort, with optionally chosen increments. There are no conditions under which SORT performance degenerates or fails. 

SORT requires almost no user set-up operations. SORT handles integer, floating-point, and string arrays plus arrays of 
more than one dimension. In ;iddition, multi key sorting of string arrays has lieen enahled. The user may specify the character 
within a string to hegiii sorting on and how many characters are to he evaluated. SORT is capable of performing up to twenty of 
these multi-kev suh-sorts (on matches found) at the same time. 

SORT on the PET: SORT is available for large-keyhoard PETS onlv. One EPROM fits all newer 40 B 80 column PETS. 
SORT EI^ROM comes at hex $9000, SAOOO, or SBOOO socket. EPROM with SORT and text dump is $55.00 (postpaid). 

SORT on the APPLE II via a quality slot independent EPROM board. Board includes function driver that supports 16 
EPROM based functions for user EPROMS. APPLE EPROM card with SORT, text screen dump and function driver is 
$110.00 (postpaid). MASTERCHARGE y VISA accepted. 




by MATRIX in EPROM for the PET and APPLE II, 




MATRIX software, inc. 315 Marion Avenue. Big Rapids, MI 49307 (616) 796-2483 
A Complete Line of Software for Small Businesses, 



02 K BYTE MEMORY 

RELIABLE AND COST EFFECTIVE RAM FOR 
6502 (j 6800 BASED MICROCOMPUTERS 

AIM 65-*KIIVI*SYM 

PET*S44-BUS 



. PLUG CDWPATIBLE WITH THE AIM-65/SVM E)(PANS10^ 
CONNECTOR BV USING A RIGHT ANGLE CONNECTOR 
(SLIPPLIEDl MOUNTED ON THE BACK OF THE MEMORV 
BOARD 

. MEMOHV BOARD EDGE CONNECTOR PLUGS INTO THE 
6aOCS44 BUS 

« CONNECTS TO PET OR KIM USING AN ADAPTOR CABLE 

* REllABLE-DVNAMJC RAM WITH ON BOARD INVISIBLE 
REFRESH-LOOKS LIKE STATIC MEMORY BUT AT 
LOWEfl COST AND A FRACTION OF THE POWER 
REQUIRED FOn STATIC BOARDS 

. USES -SV ONLV, SUPPLIED FROM HOST COMPUTER 

• FULL DOCUMENTATION ASSEMBLED AND TESTED 
BOAflDS ABE GUARANTEED FOR ONE YEAR AND 
PURCHASE PRICE IS FULLV REFUNDABLE IF BOARD IS 
RETURNED UNDAMAGED WITHIN 14 DAYS, 

ASSEW8LE0 WITH 32K RAM $395 QO 

S WITH 16K RAH S339,00 

TESTED WITHOUT RAM CHIPS !!79 00 

HARD "0 GET PARTS IND HAM CHIPSI 
WITH BOARD AND MANUAL S109 00 

RARE BOARD & MANIJAt S4g 00 



PET INTERFACE KIT-CONNECTS THE32K RAM BOARD TO 
A 4K OR aK PET. CONTAINS: INTERFACE CABLE. BOARD 
STANDOFFS. POWER SUPPLy MODIFICATION KIT AND 
COMPLETE INSTRUCTiONS MlUn 




U.S. PRICES ONLY 



p? 


w^ 


•"■ ■ !mj>imilt 


'•"'"y 


'^>'- 




■ r 


^9 



16K MEMORY 
EXPANSION KIT 



OMLY 



$58 



FOR APPLE, TRS-8a KEYBOARD, 
EXIDY, AND ALL OTHER 16K 
DYNAMIC SYSTEMS USING 
MK4116-3 OR EQUIVALENT 
DEVICES. 

* 200 NSEC ACCESS, 375 NSEC 
CYCLE 

* BURNED-IN AND FULLY 
TESTED 

* 1 YR. PARTS REPLACEMENT 
GUARANTEE 

* OTY. DISCOUNTS AVAILABLE 



ALL ASSEMBLED BOARDS AND 
MEMDFY CHIPS GARRY A FULL ONE 
YEAR REPLACEMENT WAflRANTY 



COmPUTER DEVICES 

1330 UJ.COUmi flUE. 

ORAOGE, CA 92668 

(714)653-7280 

CaiM. rnidenli plene add G% sales lAx. Muterchlffft 
ft VIft« accepted:. pie»e allow 14 dayi rar qtivcks to 
clear bank. Phone orders welcome. Shipping charges 
will b« added lo all ihipmenls. 



40 



COMPUTE! 



March, 1981. Issue lO, 



well as the non-critical nature of the level ad- 
justments required. We also have an easy way of 
compensating for any external light source which 
may have an effect on the pen, and actually ignore 
it. Let's examine this technique now. 

First, let us attack the problem of light sensiti- 
vity adjustment. It is proposed that, for this method 
we will work with, the pen need only be able to 
distinguish between the presence or absence of il- 
lumination within a selected square on the screen. If 
we are working within a range of light or no light, 
you can see that we will have a wide degree of ad- 
justment available and still allow the pen to operate 
perfectly well. 

With the original example, let's say we had 
placed a menu selection box at both scan memory 
locations 400 and 800 and assume also we are using 
the simple-form light pen which plugs into the game 
paddle input. Instead of using a hardware-based scan 
technique, we will use a software based scan as 
follows. 

Assume for example that we have placed the pen 
over the square at scan location 800 and we begin 
our scan. Both the square at 400 and at 800 appear 
illuminated at this time. Therefore if the light pen is 
pointing to either one of them, during the period of 
time of the sweep of the beam across the screen, the 
light pen will put out a series of pulses coincident 
with the presence of the beam in the area occupied 
by the pen. 

Now we can begin our scan by replacing the 
selector box at scan memory location 400 with a 
blank space (no output on the screen at this point). 
We will then go to the light pen input and stay in a 
loop for about 1/60 or 1/30 second and find out if, 
during that loop, there were any light pulses output. 
If there were still output light pulses, it means that 
we had not turned off the square over which the light 
pen is resting now, so we must continue the scan. 
Then we relight the square at location 400 and pro- 
ceed to replace the square at 800 with a blank space. 
We will again loop through the test program area to 
determine if there have been any light pulse outputs 
during the time that location 800 was turned off. If 
no outputs were sensed during this time, we know 
we have found the correct location where the light 
pen is sitting. 

We can then take the address we have found 
this way and use it to control which action is to be 
done next, just as in the previous hardware con- 
trolled case, but here with a good deal less com- 
plexity. You can also see that we may have many 
many menu boxes on the screen and by this means 
accurately determine exactly which one is being ad- 
dressed by the light pen. After all, we are the one 
who is controlling whether the light pen can see a 
Hght output from a specific square. So if we turn off 
a square, and then see that the light pen no longer 
has an output, we know which square we just con- 



trolled and therfore we know what the required 
operation will be. 

We have then substituted a software scan tech- 
nique for both the complex hardware and complex 
software the other approach would have required. 
The primary limit in the number of menu boxes we 
can use is the amount of time which would be re- 
quired, at 1/60 or 1/30 sec per box, for the light- 
pulse-present scan per box on screen. If we have no 
concern for the time this takes, then there is little 
reason to limit the number of boxes on the screen ex- 
cept to keep them far enough apart so that the light 
pen will see the light output from only one at a time, 
maintaining the wide range of light sensitivity we dis- 
cussed earlier. 



...thus far we have substituted 

a software scan for the set 

of complex hardware. 



Speaking of light sensitivity, let's discuss the 
way we'd handle an outside light source and ignore 
its influence in our selection of the item to be per- 
formed. First, a reminder that the single spot on the 
TV screen we are monitoring is dark for most of the 
time and is lit by sweeps of the beam only as it 
passes the area we are monitoring. Now if we con- 
sider the outside source of light, it will ralher seen to 
be a continuous sequence of pulses (fluorescent) or a 
continuous single light level. In the event that there 
is some continuous pulse interference, we must ad- 
just our software to test that there are no more than 
X (let's say 50) pulses which occur during a single 
sweep through our software scan subroutine. This 
would allow us to ignore such interference as is 
caused by either a fluorescent or an incandescent 
source. Certain types of light, such as the sun, can- 
not be distinguished by the pen as a wave, so are 
translated as a continuous level, thereby resulting in 
nearly zero (perhaps one) transitions during the time 
of a single scan. Thus, we decide that unless greater 
than one and less than 50 pen state transitions have 
occurred in one scan, we could probably assume that 
the visible part of the screen scan probably had been 
triggered by an outside source, and we can enter into 
some type of wait state, scanning the pen it.self for a 
time when the correct number of transitions is sensed 
and, within the wait state loop, also scan our 
keyboard and any other alternate input device which 
may be connected to the system and intended for use 
with the particular program as an input. 

A final note about outside light sources; when 
we have the pen up against the screen, the major in- 
fluence on the pen will be the light from the screen 
alone. In this position, the pen will not be affected 
very much by the outside light. 



Morch, 1981. Issue lO. 



COMPUTEI 



41 



So thus far we have substituted a software scan 
for the set of complex hardware. We have used a 
technique which requires very httle translation of ad- 
dress sensed into work to be done. We could pro- 
bably go into the type of construction required for 
the light pen itself. 

But wait, there seems to be some griping from 
the back of the room. Yes . . . Oh , . . OK! The 
gentleman in the last row says "That's ok for you 
guys who have the Visible Memory (direct access) 
display screens, but how about the rest of us who on- 
ly have the scrolling type of screen?" 

A fair question, I agree. All right. A scrolling 
type of screen is one where everything moves up one 
notch to make room for the bottom line once the 
screen is filled. Well, a number of these types of 
screens have the ability to move the cursor in a 
relative manner or an absolute manner. If it does 
have this capability, then the technique still works 
exactly the same way. ..we just have to work a little 
harder. Lets look at a quick example. 

We'll print a cursor box followed by a descrip- 
tive line on the screen, followed by a blank line, and 
repeat this for 5 selections. Now to do the cursor 
scan, we will begin from the lower left (home) cursor 
position and move-relative-cursor until we get to the 
position occupied by one of the selector boxes. Then 
we replace it with a blank space instead. Scan. Are 
there light pulses present? If not, we've found the 



TRS-80 „ . , cr. OA -rn H^^lh H-8 

svvTp Model EP-2A-79 

EPROM Programmer 



PET ' APPLE » AIM-65 » KIM-1 • SYM-1 • OHIO SCIENTIFIC 




Software avdilihlr for F 8, 6800. 8085, 8080, Z-80, 6502 1802 
2650. 6809 basec! svsleiiis. 

EPROM type is selected by a personality module which plugs into 
the front of the programmer. Power requirements are 115 VAC 
50/60 Hz. at 15 watts. It is supplied with a 36 inch ribbon cable for 
connectinq to microcomputer Requires I'v 1/0 ports. Priced at 
Si 69.00 \.i.iili one set of softvrare. (Acldilional software on disk and 
cassette for various systems.) Personality modules are shown below. 

Pan No. Programs Price 

PMO ™S 27l« V17IH1 

PM 1 27rW.27n8 171X1 

PM2 2732 .13(MI 

PM.) TMS 2716 17 nil 

PM4 ™s 2,s:(2 :i:io(i 

Pf^.S TMS 2.^1b.271h.27.'W 171)11 

Pt^S MCMW7M :i?,(lli 

Optimal Technology, Inc. 

Blue Wood 127, Earlysville, Virginia 22936 
Phone (804) 973-54S2 



light pen position. If so, cursor backspace, put back 
the selector box, space relative cursor to the next 
selector box and repeat the process. As you can see, 
there is no basic change in the procedure, just a 
slightly different approach. 

Sir, . . .you do have relative cursor?! Ok then, 
at least we've got one satisfied customer. By the way, 
you'd probably be interested; the terminal I use on 
ray machine is a scrolling type and thats why I was 
prepared for that question! 

Now for the construction of the light pen itself. 
We'll need some kind of small cylinder to house it. 
The cylinder will have to have enough room for the 
phototransistor itself. And, it should have some room 
for a small variable resistor and a voltage comparator 
IC if we want to have it fully self-contained and 
ready to plug into the game paddle input of our 
computer. 

I have provided a sketch of the proposed con- 
struction of the pen, along whh the schematic of the 
one I use. These parts I had were primarily junk-box 
components, and as a result, my total cost was about 
$1.00 (plus the software development time). You 
could probably obtain most of the components for 
$5.00 or less. 

Well, best of luck with your construction and 
testing. If you develop some interesting applications 
for your light pen, I would appreciate the chance to 
hear about them: 

Robert A. Peck 

Manager, Technical Support to Advanced Manufacturing 

MEMOREX CORP 

San Tomas a( Central Expy MS 10-10 

Santa Clara, CA 95052 




(PAWcr Supply Cjmm,inj 



Fig. 1. Basic Inexpensive Light Sensor 

Q, Mounted in Tip of Pen 

Rj Sensitivity adjustment, adjusted so that plus pulses are 

present while pen is on screen opposite a part of screen which 

is lit up. 



LM3gOU Scnii 



Output 



Fig. 2. Typical Construction 

ABOUT THE AUTHOR: Bob has a BSEEJmm Marquelle Unwersity 
and an MBA in Finance and Economics from Norlhweslern. He has been 
involved uiitli camputers since 1965, and has laut^ht microcomputer courses 
for Cogswell College in Sunnyvale, CA. He has authored three booklets on 
hardware and software for the 6502-based SYM-1 Single-Board computer. 
His assignment at Memorex involves arranging a smooth transition for new 
products from development engineering to Manufacturing. © 



42 



COMPUTE! 



March. 1981. Issue 10. 



Getting The Most 
From Your Pet 
Cassette Deck 

Editor's Note: There's much oj value herejor any cassette user, 
regardless of machine type. A couple of asides — the new recorders 
from Commodore (Ike VIC version) have tape counters. The second 
point is simply a comment on Mr. Sander's remark regardint; mail- 
order computer store tapes. . . most are quite reliable in business 
practice and quality control. RCL. 

Louis F. Sander 
Pittsburgh, PA 

PET owners not fortunate enough to own a disk 
spend many minutes, and ultimately many hours, 
waiting for the cassette deck to finish its work. 
SEARCHING seems to take forever, and we never 
know whether the search will finish with a READY, 
or with the dreaded ?LOAD ERROR. This article 
gives some practical advice on making that waiting 
time shorter, more productive, and less filled with 
anxiety. It is oriented toward the novice, and it con- 
tains much that has been explained before, although 
never to our knowledge all in one place. But even the 
most experienced PLAY presser should find 
something of value in it. We begin with a treatise on 
tape buying, proceed to information on recorder care 
and useful accessories, and end with a compendium 
of helpful hints for the recordist, librarian and 
programmer. 

What Should You Feed A PET? 

Standard cassettes can be had at prices from under 
50^ each to over $5.00, and it seems impossible to 
know which ones to buy. Since the typical PET 
owner will end up with dozens of tapes in his library, 
knowing a bit about cassettes can be quite important 
— we want to be sure that ours will perform reliably, 
without contributing to the loss or ruin of valuable 
programs, but we don't want to pay extra for quality 
we can't really use. (After all, most of us are saving 
up for that disk system.) A careful study will show 
that there are three main areas of difference among 
cassettes, each of which we'll discuss here: playing 
time, mechanical construction, and type of magnetic 
tape. 

First, playing time. Every cassette is marked 
with a number such as C-30, C-60, C-90, etc. The 
digits after the 'C tell how many total minutes of 
playing time there are on both sides of the tape. A 
C-30, for example, has two 15-minute sides, for a 
total of 30. Even though the longer tapes cost very 
little more than the short ones, for most PET owners 
the C-30 is the longest one to buy. One side of a 
C-30 will hold at least six long (8K) programs, and 
can be fully rewound in about 60 seconds. A C-60 
will hold twice as many programs, but it gets tedious 



to search through all that tape to find the one you're 
looking for; the rewind time is longer, too. The 
C-90's and above tend to be made with very thin 
tape that likes to break, or to let data leak through 
from one side of the tape to the other, either of which 
can ruin your program and your day. Probably the 
best size is the C-10, which is not widely available, 
but which holds one or two programs on a side, and 
which nicely minimizes search time. 

Cassette construction is less obvious than the 
other two factors, but it does bear some discussion. 
Cassette housings range from sloppily molded boxes 
to finely assembled mechanisms with bearings and 
other anti-friction devices. Most housings are glued 
together, but some are assembled with screws. Many 
experienced PET users prefer the screw type, which 
can be taken apart for emergency untangling of 
tapes. (That can be a big factor when the fouled tape 
has your latest masterpiece on it.) Sloppy construc- 
tion is most often found in off-brand discount store 
cassettes, and it should be avoided, since a sloppy 
housing tends to let the tape escape and be mangled 
by your recorder. In general, the more expensive 
cassettes have better housings, and are easier to re- 
wind or fast forward, but you should have little trou- 
ble with any but the very poorest housing.?. 

The finest and most expensive magnetic tape 
has a chromium dioxide (CrO^) coating, and should 
not be used in the PET. It requires special circuitry 
that the PET doesn't have, and its greater 
abrasivencss can cause rapid wear to lapc-handling 
parts. The next step down is extra-quality tape with 
a ferric oxide coating, usually selling for $2.50 -$5.00 
or more per cassette; this tape is designed to give a 
very wide frequency response in stereo recording and 
playback. It will work fine in the PET's monophonic 
recorder, but its premium quality doesn't add much 
to performance, and for many people the extra qual- 
ity is not worth the extra price. The same can be 
said of the "certified" computer cassettes in this 
price range. Your PET doesn't need "computer 
quality" tape, or leaderless tape, so why pay extra 
for it? 

Further down the line is garden-variety ferric 
oxide tape with a well-known audio or electronics 
brand, usually sold for under $2, or much less in 
multi-packs. For most PET owners, this is the best 
combination of price and performance. The tape is 
designed for monophonic recorders like the PET's, 
and it has the uniform quality usually found in well- 
known brands of any product. The widely available 
Radio Shack Concertape, starting at 3/$1.99| is a 
good example of this kind of tape. Also in this price 
range are the cassettes sold by mail-order computer 
stores that cater to PET owners. There are some real 
advantages to these cassettes — the price is right, 
they are available in the convenient C-10 size, and 
they are usually screw-assembled. But there can be 
risks, too. Some mail-order computer stores are 



March, 1981. Issue lO, 



COMPUTE! 



43 




THE STAR MODEM 



From Livermore Data Systems 



RS232 MODEM 
IEEE 488 MODEM 
RS232 GCin 
IEEE 488 coin 



SALE $135 

SALE S245 

$170 

$280 



STAR Modem is the price performance leader with a full 
2 YEAR FACTORY WARRANTY. 




WE CARRY THE BLACK APPLE 



Bell&Hdluell 



VAIK I n. [iJSiVS 11 fi 



appkL computer inc. 



EBS Business System tor PET/CBM 

Extremely comprehensive package to small Ixjsiness, 
Fully inlegraled mventtxy and accounts receivable system 
including invoices, packing slips, mall labels, statements, 
bank deposit slips, and 17 reports- Allows any ol 10 
standard letters lo tie merged witti customer record info on 
either a selective or complete file tiasis Demo disk and 
system description available for S3.00. 

Piper-Miti Word ProHuor $29.95 

PET/CBM full featured 60 command system by Mk:hael 
Riley. Uses either tape or disk and any printer. Includes 
in-text commands, floating cursor, scrolling, etc. 



6502 

6502A 

6520 PIA 

6522 VIA 

6532 

2114-L450 

2114-L200 

2716 EPROM (5 volt) 

TMS 2532 EPROM 

41ie-2D0 II RAM 

S-100 Wire Wrap 



7.45 
8,40 
515 
645 
7,90 



10/6.95 50/6.55 

10/7.95 50/7.35 

10/4.90 50/4.45 

10/6.10 50/5.75 

10/7,40 50/7,00 

3,45 20/3,35 

4,15 20/3,95 

9,90 5/9,45 



100/615 

1 00/6.90 

100/4.15 

100/5.45 

100/660 

1 00/3.25 

100/3-75 

10/8,90 

23.50 

lir 30.00 

2.65 



CASSEHES - AGFA PE-Bl I PREMIUM 

High output, lov^ rioise, 5 screw housing. labels 
C-10 10/5.65 50/25.00 100/48.00 

C-30 10/7.30 50/34.00 1 00/66.00 

All otltei lengtlis available. Write for price list. 



^^^Bs t^^^^^^H^^H^H 



4 PART HARMONY MUSIC SYSTEM for PET 

Allows you to easily enter, display, edit, and p'3y4 part 
hamiony music Includes wfiole notes thm 64ths (with 
(Jolted and triplets}, tempo change, key signature, 
transpose, etc The KL-4 M unit i ncludes D lo A converter 
and amplifier (add your own speaker). 
KL-4M Mille BllN witk ITMM Pr*|nii 159.90 



KM MM Pascal for PET $75 

Subset ol standard Pascal with true machine language 
translator for faster execulm, 16K with tape or disk 



EARL for PET [disk tile based) $65 

Editor. Assembler, Relocater, Linker to generate relocat- 
able object code. 



(ullFORTH-f lor PET/CBM $65 

A full-tealurEd FORTH with exiensions confonnirvg lo Forth 
Interest Grotjp standards. Includes assembler, string process- 
ing capabilities, disk virtual memory multiple dimensioned 
arrays, floating point and integer processing. 




commodore 




CBM-PET SPECIALS 
^ Up t( tl!35 FREE 
;<^ mircliiidlii «itli piirtliit of 

^ HI If fillowliii CBM'PET htmil p,^^ 

8032 32K - 80 column CRT $1795 235 
8050 Dual Disk Drive- 1 megabyte 1795 235 
6N Full size graphics keyboaiil 795 75 
16K Business or Graphic Keyboard 995 150 
32K Business or Graphic Keyboard 1 295 205 
2040 Dual Disk Drive - 343.000 bytes 1295 105 
2022 Tractor Feed Printer 795 100 
C2N External Cassette Deck 95 12 
CBM Voice Synthesizer 395 SO 
_J.R!TEiORSySTEM.PRlCES 

•"EDUCATIONAL DISCOUNTS*** 

Bi) 2 FET/CBM ttmf\tn. nciin I FREE 



WordPro 3 -32K CBM, disk, printer 


170 


WordPro 4 -8032, disk, printer 


255 


OZZ Oata Base System (or CBM 8032 


335 


VISICALC for PET, ATARI 


170 


BPl General Ledger, A/P. A/R (or PET/CBM 


270 


Programmers Toolkit - PET ROM Utilities 


34,90 


2 Meter IEEE lo IEEE Cable 


43.00 


PET Spacemaker Switch 


24.90 


Dust Cover for PET 


6.90 


IEEE-Parallel Printer Interface (or PET 


105 


IEEE-RS232 Printer Interface (or PET 


149 


The PET Revealed 


17.00 


Library of PET Subrrxjlines 


17.00 



Sitrci Htokup BB 

Over 1000 programs and services available. 



Ml PLOT Intelligent Plotter 
by Watanabe Instruments (Digiplot) 

SPECIAL 
$1145 




Has all intelligent functions (or producing grapfis and 
drawings including fl vector and 4 chaxacter commands. 
Solid and broken lines can be specified Character gen- 
eratorfof alpha, numeric, and symbola Characters can be 
rotated in 4 orientations, and can be 1 6 sizes Coordinate 
axes drawn by specifying graduation interval and number 
ot repetitions Parallel ASCII interlace, 11x17 paper 



FLEX-FILE Ditl Bisi for CBM/PET $60 

Random file handling system with Report Writer and 
Mail Label Handler. By Michael Riley 



DISKS 

(write for quantity prices) 




SCOTCH (3M) 5W" 
SCOTCH (3M) B" 
Maxell 5W 
Maxell 8" Disks 
Verbatim 5 'A" 

(add 1 .00 (or Vertjalim 
VerOatim 8" Obi Dens 
BASF 5'/." 
BASF 6" 

Diskette Storage Pages 
Disk Library Cases 



10/2.90 50/2.80 100/2.70 
10/2.95 50/2.85 100/2.75 
10/4.25 50/4.10 100/3.95 
10/4.65 5O/4.50 100/4.35 
10/2.45 50/2.40 100/2.35 
5'/i" plastic storage box) 
10/3.45 50/3.35 100/3.25 
10/2.60 20/2.50 100/2.40 
10/2.65 20/2.55 100/2.45 
10 lor 3.95 
8" -2.85 5%"- 2.15 



EPSON MX-80 Pnnter S 

STARWRITER Daisy Wheel Printer $1500 

Centronics 737 Printer S79D 

NEC Spinwriter- parallel $2500 
XYMEC Hl-Q 1000 Intelligent Daisy Wheel S2150 

Leedex Video too 12" Monitor SI 29 
ZENITH OATA SYSTEMS 

Zenith Z19 Terminal (lactory asm.) $735 

Zenith ZB9 with 4eK $2150 



SYM-1 S209 

SYM BAS-1 BASIC or RAE-1/2 Assembler S 85 

KTM-2/8Q Synertek Video Board $349 

KIM-I (add $34 for power supply) $159 

Seawell Motherboard - 4K RAM $195 

Seawell 16K Static RAM - KIM. SYM, AIM $320 



1 ATARI 800 $777 




1 1 5 E- Stiimp RoacJ 
r\/lontgomeryville, PA 1 8936 



215-699-5826 



A B Computers 



All Atiri Modules 20% OFF 



ATARI EDUCATIONAL PLAN Wrtti m imut. 



A P Products 15% OFF 
A P Hobby-Blox 15% OFF 



ALL BOOK ind SOFTWARE PRICES DISCOUNTED 

Tfic 8086 Book lOsborne) $12,75 

zeooO Assembly Language Programming SI 0.60 

PET Personal Computer Guide (Ostane) $12.75 

PET and Ihe lEEE^BB Bus (Osborne) $12.75 

6502 Assembly Language (Osborne) S 9.90 

Programming tlie 6502 (Zaks) $f0.45 

6502 Applications Book (Zaks) $10.45 

6502 Soflware Cookbook (Scelbi) S 9.45 

CP/M Handbook {w/ MP/M) Zaks $11.95 



WRITE FOR CATALOG. 

Ada SI 25 per order for shijjping We pay balaiKcol UPS surface cn.iiges 
on all prepaid orders Prices iisied are on cish discount 0,1515 Hegul.ii 
prices slignily higher 



44 



COMPUTE! 



March, 1981. Issue 10. 



shaky operations with flaky quality control and fluky 
business practices. A good policy with these tapes is 
to try them if it suits you, but keep a close eye on 
what you get. 

At the bottom of the list are the tapes you 
should avoid — the ones sold in discount stores, with 
brands you never heard of in audio or electronics. 
These are not much cheaper than Concertapes, and 
the tape inside is sometimes uneven and dirty. For 
most of us, the risk of getting junk is not worth the 
savings, so we should stick with something better. 

Looking Out For Tape #1 

Every tape head needs periodic maintenance, and the 
two on your PET are no exception. Experts recom- 
mend cleaning and demagnetizing tape heads after 
every ten hours of use, and you do yourself a big 
favor by following their advice. If you neglect these 
important tasks, sooner or later you'll begin to notice 
frequent LOAD ERROR messages, and you may 
permanently damage every recording you pass by the 
head. Tape head tolerances are measured in micro- 
inches, and it's very common for an invisible buildup 
of oxide residues to cause major signal losses, often 
leading to LOAD ERRORs. It's also common for 
recording heads to become magnetized after a period 
of use, especially if the recorder power is cut while 
doing a SAVE. A magnetized head partially erases 
every tape that is run past it. A dirty head can 
scratch tapes. Remember, a good head session takes 
only about 1010.^ minutes, and it clears your head for 
another 0Ag hours of use, so it's well worth the 
effort. 

To start your maintenance program, get a bottle 
or spray can of tape head cleaner and a package of 
swabs. It's helpful, too, to get a small angled mirror, 
so you can inspect the heads while you work on 
them. Also get a head demagnetizer, of the type that 
plugs into the wall. (The cleaners and demagnetizers 
that look like cassettes are not as effective as the 
other types, and some poor ones can actually damage 
your head, so we suggest that you avoid them.) All 
these items can be purchased, often in kit form for 
under S20.00, at any good audio or electronics store. 
Sometimes you can borrow them from a friend who's 
into stereo or home computers. 

When maintenance time comes, follow the in- 
structions that come with the cleaner, and thoroughly 
swab the heads, tape guides, capstan and pinch 
roller, all of which you can get to by unplugging the 
PET and depressing the PLAY control. If you can't 
identify which parts to clean, any knowledgeable 
stereo salesman can show you the corresponding 
parts on his equipment, and that should be enough 
to get you started. Next, demagnetize the heads, 
meticulously following the instructions that come 
with your demagnetizer. Particularly avoid cutting 
power to the demagnetizer when it is anywhere close 
to a head, or you may magnetize it yourself. Keep 



your tapes at least 5 - 6 feet away from the 
demagnetizer at all times, or you may accidentally 
erase them. Remember that magnetic fields pass 
easily through everything but steel, and that a 
wooden desk drawer can hide tapes from you, but 
not from your demagger. 

Useful Tape Accessories 

The most useful tape accessory is a second recorder, 
but not the kind that plugs into the Second Cassette 
Port. You will gain many enjoyable minutes by using 
an extra recorder of any kind to search or rewind one 
tape while LOADing another. When searching, just 
play the tape until you hear the high-pitched leader 
tone, and start it right there on your PET. The 
buzzsaw sound after the leader tone is the actual pro- 
gram material. If your extra recorder has a tape 
counter, you can use it to keep track of program 
locations on the tape, and further lessen your 
SEARCHING time. If it has the Cue/Review 
feature, you can listen to the recorded material while 
rewinding or fast forwarding, which is also very 
helpful in finding things. If your recorder has a built- 
in microphone, make or buy a short-circuited plug to 
fit the MIC jack and cut out the microphone; that 
will let you erase selected areas on your tapes, which 
is useful if you're recording over other material and 
getting a lot of VERIFY ERRORs. Without the 
built-in mike, you don't need the shorting plug. 

The extra recorder, used in audio mode, can 
help you type in programs from COMPUTE! and 
other sources, too. Just read the program aloud into 
the microphone, carefully enunciating every comma 
and semicolon, then play it back to yourself and type 
in the program as you hear it. This is a super 
method for proofreading programs that don't work. 

Another useful accessory is a bulk eraser, for 
quickly erasing tapes when you want to re-use them. 
Mine is a Nortronics Sound-Off, a permanent 
magnet unit that works by just sliding the cassette 
through a slot. Most of them plug into the wall, and 
work like head demagnetizers, but on a grander 
scale. Be careful with bulk erasers — they create a 
strong magnetic field that can erase your good tapes 
if they are anywhere close by. 

The stores have many other items you might 
find worthwhile. Radio Shack has a slick manual 
rewinder. The Sams book "Tape Recording for the 
Hobbyist" and the Nortronics "Recorder Care 
Manual" arc good sources of useful information. Ad- 
vanced tape hobbyists may also like to have a tape 
splicer and a head alignment tape, but these are 
beyond the needs of most of us. 

Tape Handling Tips 

1. Running new tapes back and forth a few times 
before using them will minimize binding and 
breakage. Erasing tapes before re-use will minimize 
read errors due to "junk" on the tape. Breaking out 



March, 1981. Issue lO. 



COMPUTE! 



45 



Announcing 








from the publishers of 

COMPUTE! 

The Journol For Progressive CompirUng 



Small System Services, Inc. is pleased to announce publication of a 
new quarterly magazine exclusively for the new VIC® connputer. 



Horn* «j-id CduoMtional 



COMPU TING! , editorially and physically of the same high quality as 
COMPUTE!, will premier with an April/May/June issue. Every issue will 
be full of useful applications material and learning aids. 

Our staff of Contributing Editors already includes sonne of the best 
authors in the industry: Jim Butterf ield, Tory Esbensen, Harvey 
Herman, and David Thornburg, to name a few. 



Horrw »nd Educatloriat 



COMPU TIIMG! will teach, entice, and interact with readers to help users 
develop nnaximunn benefit fronn the new VIC® personal computer 
series fronn Commodore. 



Reserve your f irat iseues now by filling out the form below. 



r. 



.Trial subscription. 



n 



Addrese inquiries and 
correspondence t;o: 

COMPUTING! 

P.O. Box 5406 

Greensboro, NC P7403 
913-275-3603 

Robert C Lock, 

Editor/Pubiisher 



Please send me the first three quarterly issues 

of 19S1 for the introductory price of $5.00. 

.^__^^^_ Ssmpie issua. 

Please send me the first issue at an 

introductory price of SS.OO. 

I already own a computer. 

I don't yet own a computer but want to 

learn mor-e about thenn. 
I expect Co buy a VlC' computer. 



Name 

Address 
City 



.State. 



_Zip_ 



Charge rny. MC_ 



Visa. 



expires_ 



./_ 



. Payment enclosed 
Bill me. SLOD billing charge will be added. 



J 



COMPUTING! 



1 UratJemarks -jl Small Systems ^er-vcwa. Vic VIC" ib o r*t^ai.t!rBt.t craoertiorh gf CortvnoOtx-K Elusnofift Mscrunes. Irx;. 



46 



COMPUTE! 



March. NSl. Issue 10. 



the write protect tabs on a cassette will keep you 
from writing over programs by mistake. Covering the 
write protect hole with tape will override the 
protection. 

2. Keep your tapes clean: Rewind cassettes before 
putting them aside, and never touch the magnetic 
tape itself. Always use plastic cassette boxes; the soft 
ones are cheaper and tougher, but the hard ones are 
prettier. (I use hard boxes for master tapes and soft 
ones for working copies.) Keep your cassette boxes in 
metal containers; stray magnetic fields are 
everywhere, especially around motors and 
transformers, and they can damage unprotected 
tapes. 

3. As soon a.s you SAVE a program, label the 
cassette with the program name. Half-inch masking 
tape makes an easily removable label for cassettes, 
and also fits perfectly on the edge of hard or soft 
cassette boxes. Half-inch Scotch Magic Tape makes a 
neatly erasable label for the same places. 

4. A IK program takes about 35 seconds to SAVE, 
VERIFY, or LOAD. A 4K program takes about 90 
seconds, and an 8K program about 150 seconds, or 
2}^ minutes. The practice of SAVEing each program 
twice on the same tape will keep you happy in the 
face of minor malfunctions; the practice of keeping 



master copies on a separate tape in a separate room 
will keep you happy in the face of disaster. 

5. There is a small but real danger of write-through 
when programs arc recorded on both sides of one 
piece of tape. You can avoid it by using only one 
side of your cassette, or by using both sides and 
recording no further than mid-tape. I usually SAVE 
one program twice on each side of a C-10. That way 
I have minimal search and rewind time, conveniently 
located second copies of each program, and no 
overlapping. 

6. During program development, SAVE your work 
frequently, so you'll have something to work with 
after an unanticipated NEW or system crash. To 
keep track of the different versions, make the date 
and time of the SAVE an integral part of your pro- 
gram's working name: "02141015SPACEWAR" fits 
into the 16-character limit, and indicates that this 
version of SPACEWAR was SAVEd on 2/14 at 10:15 
AM. If there's ever a question, it will be obvious 
that "02141 300SPACEWAR" is a later version, and 
that "01312200SPACEWAR" is an earlier one. 

That's the end of one user's notes on saving 
time and grief with your PET's tape deck. There 
must be many other good ideas on the subject. If 
you have some, let us know about them. 



Announcing the magazine specifically for 
the educational user of microcomputers. 



Edunational 
bomputer 

■ magazine 



• EDUCATIONAL COMPUTER will address the impaci of microcomputers 
in our schools, colleges and umversmes 



• EDUCATIONAL COMPUTER witi cover critical issues that ccintror>t 
users o( microcomputers in education 



• EDUCATIONAL COMPUTER will include articles by edueatofs 

concerning their experiences with these new and important classroom 
tools. 



Beginning with the May-June 1981 issue, it will no longer be necessary lor you to 
interpret the technical (argon of engineers This bi-monihly publication will present 
current information in a Clear, concise and readily comprehensible manner 
EDUCATIONAL COMPUTER has been created with you m mind 

EDUCATIONAL COMPUTER s mam obiective is to become a major lolormanonal 
exchange tor not only elementary and high schools, bul (or colleges ancJ universities as 
well All of us can learn from each other, and EDUCATIONAL COMPUTER will be there 
to help spread the word 

EvBry cfassroom snd av^ry i^gchef will havs 3n educstiona! computer. 

Every classroom and every teacher should have EDUCATIONAL COMPUTER magazine. 

Subscribe early and save. If you Order EDUCATIONAL COMPUTER before Match 10. 
1981. you will receive the first year's subscriplion for $10 instead of the normal rate of 
S12 per year. The newsstand price is S2 50 per issue 



Edunational 
bomputer 



PO Boi 535, Cupertino CA 95015 



Enclosed is my J10 for one year (if ordered before March 10. 1981) 
D Check D Money Order 



Name 



Address 
City 



State 



Zip . 



Canada: Same as US, in U S funds 

Other Foreign S18 one year only. U.S. funds 



March, 1981. Issue lO. 



COMPUTE! 



47 



PET 



GAMES APPLE 




Unique, Action-packed Games. 



NUCLEAR WAR Nuclear conf ronlstion on a global icale. 

Many scenarios. 



GALAXY 



PillagB a 3-D galaxy collecting loot from 
captive worlds. 



STOCK MARKET Rags to riches game of buy and sell with 
computer stocks. 



ENCRYPT 



ALIEN 



Challenging puzzles, decipher coded 
massages- 
Protect the federation- Real time 3-D 
navigation. • 




All are User-tested with HELPS Multi-player games have Single-player option 

Each . . . Cassette J14.95 Diskette S19,95 , one-player 




1903 Rio Gr*nd« 

Rus-tiriJ Texas 

78705 



1-S12-477-22C7 



P.O. Box 8403 

Rustirij Texas 

78712 



masief charge 



>j 



PET SOFTWARE 

LAS VEGAS CASINO SERIES: 

The'SiG tour programs were (Jn>uJDp«d bottia-a a tulocia.1 lor Ihu^ planning la visit sCasino',3r(l iii,anlinf] id leisrn \a playcorrei 
meiKSi lor ihe ^eriaLis-garntile'r to dm'dDp drd thraougfily lesT a c^rribling 'syafem' under aciijjtl Cas.rno condilJGrs. All txiiii 
Dplions available in Ihe Casino {ji irid: UGM Gianct Hglil in tas Vegas have [>een i.-icsrporaled into ihese piog.rarns Ful 
FiavD&evn used la sdow lh« cardft tw^ng d»all, Lh-e Houl«lle Wheal ipirning, andthC' D4C« being IhraA'D in ordni ic inci 

1. Caftlno Black|*ck; 

Fo( 1^ioSpiS|refflfi1j&trvai!Ma(oi Kf«p& irach bl wir>nin|]« At Ic^nur^ 'C tK^n sUy*' piui numtwr oi riinli 
won, l-osi. and TJed 4rc tt>e number ot TimAs ih# d«aici and encn piaysi nai 'Bi>tiTM Piity wklh 1. 2. 0" 
dKks ChanQ« Aec^i ni 'eshjtfic at 4ny tlma Splil pairs. Double Dotkr. or place an Ir>4u(anc4 fiM, 
Full Casinorulflsand iTianiiDtheropliDna 






ATARI ATARI SALE 



Z, Cf»<r>oRDuJ«11«: 

Bi!t ofi One nuirber. two riufTiBB'S, Md^ i 
TwALVfr way J to Del 



\ b^acli. etc, Wakh llie numbers come up tA Ihe wheel spiris. 



3. Cai-lna Bacccral-: 

Jaii>es Bonds' laiiori'Ia gama. Two pames In -on. Casino irtyMr ai^tf 
Ie*Torci To h«ip in dev«''Wr>a ■ MTlnnlng *sr9lem' 



Btvli. IrKKidaa spAcial 



*. Casino Ci*pt: 

Fiet ih« piiiH 14 P«s3 0r F«|i| Olt. a«| tri« Hwdway or Pr*» with Double OdCi. 
Ten tihti\ts\^f,\ , 



5. CacIno Package: 

All Idji Casino Progiarrs above ...,v........-.........t,,,,.-,--. , ,, 

STRATEGIC GAMES: 

6. Bacligammon. 

Play Sac liDamrTionaoarrtiii|roiif PET. EnceUtmgiWhlcttndCou&ii'^ODIKir 
make roia laii ar^ f-icitlnQaani* ... 



I 7.« 
S 7.9^ 



HARDWARE 




800 COMPUTER 


$825 


400 W/16K 


$495 


822 PRINTER 


$400 


820 PRINTER 


$410 


MICK0LINS-8a 


$600 


STARWHITEB I 


$1650 


5" MEMOREX DISK 


10/S30 


810 DISK DRIVE 


S5S0 


32K MICROTEK RA^ 


$195 


32K AXLON RAM 


S275 


16K ATARI RAM 


$155 


8K ATARI RAM 


$95 


8 50 INTERFACE 


S185 


LIGHT PEN 


569.95 


815 DISK $1350.00 



SOFTWARE 






ALL SEEBREE'S 


20% 


3ff 


BASKETBALL 


$31 


.95 


SUPER BREAKOUT 


$31 


.95 


STATISTICS I 


$15 


.95 


MORTGAGE & LOAN $11 


.95 


STAR RAIDERS 


$48 


.03 


TELELINK I 


$19 


.95 


3D SUPERGRAPHICS$39 


.95 


SPACE INVADERS 


$15 


.95 


COMPUMAX: 






GENERAL LEDGER 


$139 


,95 


PAYABLES 


S139 


■ 95 


RECEIVABLES 


$139 


.95 


MICROHOME 


$79 


.95 


SUNDAY GOLP 


S9 


.95 



7. SPI'IIKTHUDCIIS- iWIIHlflUNOj 

Viltillen by COMMODOPt JAPAN Perlaims ecactl^ liKe Ih^ pop^^la' yid«o a'cade vCsiQn twniQ clayed al! 

ot^eilh^cciuhlry MB<:hmc langu^a-Qe graphics and sourdpiovlnie nsunaf ^ni^rtdJnffient . . . . . 

Ple,a5e specify wnicli HOW sei yojr PET fias. 

&. CfMchars: 

P>ay against llie PET PET plays a gnsod, fast ffarre accoiding In InTbrnaTionai Cneck.eF Rul«S. Eie^EJei^l 
grapTirc? ahcw llie board annj aliehee'k>ers Walch your PET move his man arojnd ihe bMi^ Ci«k ernjw^ 
fl'iePsedCimefofoaeh mo»iB , ... .. ,, 



NEW! KAIL LIST BY MAGIC LANTERN 



$59.95 



Runs on disK, Sort by name, zip. Select on 
15 cnaracter information field. Full doc- 
umentation included. Available now. 



This IS lhre« dim«niia<ial TicTacTo* pUyM cm four, * », A biMrda PET playi ■ tut •icilu>D BW" 

crKW&ingon«ollhr»«iltai#gkiira'aachaanic 



IB. OoMohu: 

Anci«n| Oi'nesa board gam« pFay«d on a 3 x 9 boafd. Gal £ rr 
Kira[«^y foieaclrgarre , 



n a raiv telOf« your PET. A dJirercnl 



QthallK 

Erifjlish game kncwn as R^versil. Try lo i:apluT« IJw PET'S man before Si* catlu'ei yOurs Pl4y against rh* 

PCTor jgajn^lyputlrierds Fa^Tandlun , 



tZ. Crlbbag*: 

An Evcallent vwMon ol ir^is tarfMite end Oiirn All cards ara »howrs using PET » «i(c#llftr«i Qra 
The PET plays a cool \a^<.^\ (i*fn* rlitlrcut 10 bvil rrvr^fof Ihe bail plar«is . 

II. llama Packag«: 



mve program's . 



QUARAHrEC: "AK {KogrSms arfl guaraileed la toe fr&e from errors and tn Ifjafl-on ^ny PET. Anydetedrve lapes wHI !w 
□ I charge 



.. 43495 
splaciTsd liee 



DATA BASE BY MAGIC LANTERN 



$99,95 



Requires disk, full data base management 
faciilites including select, sort, print, etc. 
Available March 31. write foe description. 

FREE CATALOG 8 NEWSLETTER - SEND NAME, ADDRESS 

•^ — -^1^ "e stock over too ATAill software 

titles. In atook products ship 
within 24 hours. Prices are for 
MAIL ORDER ONLY. COD UHDEH $100. 
3513 UNIVERSITY AVE. MADISON, WI 
53705 (60S) 233-2036 



liwgc - 

LAIIlHII 
COfilPUCE^ 

Small Systprm Wrtti Big Ide^ 



ViSA- 



firder Fiom: CMS SOfTWARE, 5115 M«neree Drive. Dallas, TX 75277 



48 



COMPUTE! 



March. 1961 Issue \0. 



Part 3 of several 

The Mysterious And 
Unpredictable RND 



Bob Albrecht and 
George Firedrake 

From a book of the same name 
by Dymax Publishing Company; 
copyright ©1980 Dymax. 
Permission to reprint by 
teachers for classroom 
use IS granted. 



Editor's Note: You may 

reach Bob & George 

by mail ai: 

P.O. Box 310 

Menlo Park, CA 

94025 



Dice Roller 

OK PET, let's roll one die a bunch of times. We will 
simulate rolling an ordinary six-sided die. For each 
roll, the possible outcomes are 1 or 2 or 3 or 4 or 5 
or 6. 

100 R£M"""DICE ROLLER il 

2^0 REM---FIND OUT HOW MANY ROLLS 

210 PRINT " CCLR] " ; 

220 INPUT "HOW MANY DICE ROLLS" ; N 



1+00 REM---ROLL ONE DIE N TIMES 

410 FOR K = 1 TO N 

420 DIE = INTC6-RNDC1)) + 1 

430 PRINT DIE^ 

1*40 NEXT K 

450 PRINT 

999 END 

For many dice games or other uses of dice, we roll 
two dice. The outcome of a roll is the total of the 
"spots" or number showing on both dice. 






= 7 



Your turn. Tel! PET how to simulate rolling two 

dice. 

Exercise 11. Write a program to simulate rolling two 

dice, N times. 



HOW MANY DICE ROLLS? 20 



9 
6 

5 

READY 



3 


10 


8 


k 


U 


11 


5 


6 




When we roll two dice, the possible outcomes are 
numbers from 2 to 12. However, they are not equally 
likely. 



There is only one way to get 2. 



□ □ 



1+1=2 



There are two ways to get 3. 






1+2-3 
2+ 1-3 



March. 1981 Issue lO. 



COMPUTE! 



49 



Moving with You into tine '80s 

Microcomputer Courseware 

From Scott, Foresman, 

the Education Expert 




Reading Skills Courseware Series (Grades K-6) 
and Mathematics Courseware Series (Grades K-8) 
feature: 

• content correlated wilh basal series — to 
supplennent instruction, provide enrichment 

• individualizing capabilities that meet each pupil's 
learning needs 

• nnotivating animation, color graphics, nnusic, and 
speech 

• comprehensive Teacher's Guides 

School Management Applications for 

administrators feature: 

• fourteen modules, each programmed to 
streamline a specific area of school 
administrative work 

• easy information storage and access, clearly 
organized printed reports 

• program instructions in plain English, helpful 
Reference Manuals 



Scott, Foresman Module Packages 

(Grades 1-3) for Speak & Read™ Educa- 
tional Model, complete with Pupil Books, 
Teacher's Guides, and optional Work- 
books, can enhance any reading cur- 
riculum by reinforcing essential skills. 



Scott, Foresman and Company 

Electronic Publishing 

Glenview, Illinois 60025 



Learn more. Mail this coupon 
to receive free information. 

To Scott, Foresman Electronic Publishing 

Please send me free, full-color brochures on: 

D Reading Skills Courseware Series and Mathematics 

Courseware Series (E0103) 
D School Management Applications (E0101) 
D Scott, Foresman Module Packages for Speak & 

ReadTM(E0141) 



SnhnnI 






003 


Name 


Position 








School AddrfiRR 


Cilv 


.Stalfl 


7IP CnrtP 





50 



COMPUTE! 



March, 1981. Issue lO. 



• There are several ways to get 7. 



Or, since the total for all outcomes is 36, 



MB 



• • • 

• • • 



1+6=7 
6+1 = 7 
^+3 = 7 



And several more! 



Exercise 12. Complete the following table showing 
the number of different ways to get each possible out- 
come (2 through 12) in rolling two 6-sided dice. 



OUTCOME 



NUMBER OF WAYS 



2 

3 

4 

5 

6 

7 

8 

9 

10 

11 

12 



1 
2 
5 



Next, we would like to compute proportions, as 
defined below (X is any outcome, 2 through 12). 



PROPORTION FOR 
OUTCOME 



NUMBER OF WAYS 
TO GET OUTCOME X 

TOTAL NUMBER OF WAYS 
FOR ALL OUTCOMES 



PROPORTION FOR 
OUTCOME X 



NUMBER OF WAYS 
TO GET OUTCOME X 



Exercise 13. Complete the following 
table (use a calculator!) 




OUTCOME NUMBER OF WAYS PROPORTION 



2 

3 

4 

5 

6 

7 

8 

9 

10 

11 

12 



1 

2 
3 



1/36 = .0278 
2/36 = .0556 
3/36 = .0833 



If we flip a coin, the probability of getting HEADS is 

J/j = .5. What is the probability of getting TAILS? 
Yes, we are leading up to a heavy exercise. But, you can 
probably do it! 

Exercise 14. Write a program to simulate N rolls of 
two dice. Don't print the results. Instead, count the 
number of occurrences of each possible outcome (2 
thi'ough 12), then print this informalion nnf/ also 
print the proportion of each outcome. Huh? For N 
rolls, the proportion for outcome X is: 



PROPORTION FOR 
OUTCOME X 




NUMBER OF TIMES 
X OCCURRED 

N 



^ 


y: 


1 


V 



March. 1981 Issue lO. COMPUTi! 51 



TEACHING TOOLS: Microcomputer Services 

EDUCATIONAL SOFTWARE 
FOR PET* COMPUTERS 

• Extensively tested in schools 

• Adapts the computer to the child 

• Follows sound educational practices 

ADDITION AND SUBTRACTION PROGRAMS 

The addition program has 24 problem levels; the subtraction program has 12 levels. 
Problems are presented vertically, are answered from right to left, and carrying or 
regrouping can be marked. The child receives immediate feedback, with graphics 
reinforcing correct answers. By selecting from a menu, you can set the number and 
difficulty level of the problems, time limit, and number of attempts allowed. 

LETTERS & NUMBERS PROGRAM 

Ideal for young children and special education classes, this program uses large 
lettersand numbers created with PET* graphics. Youroptions include matching one 
or more characters, completing sequences, and filling in missing items; you may 
select letters, numbers, or both. 

MATCH GAME PROGRAM 

Use this match or concentration game for memory building and lesson reviews in 
game format. This program gives you many options. Play it with shapes, words, math 
problems and answers, and word pairs (such as synonyms or translations). Select 
sets of matches built into the program or enter your own. One to four players 
compete; single players challenge the computer. 

WRITE FOR MORE INFORMATION 

TEACHING TOOLS'"" programs run on any PET*. Each program comes with complete 
instructions, is easy to use, and is GUARANTEED TO BE THE BEST AVAILABLE. 

ORDER the Addition, Subtraction, Letters & Numbers, and Match Game by sending 
$20.00 for each program, plus $1 .00 per order for postage and handling. All programs 
are mailed first class. Ask for free details about programs available soon: Beginning 
Number Skills, Multiplication, Division, and Spelling. MONEY BACK GUARANTEE. 

Master Charge and Visa accepted. .pET is a trademark of 

Include card number, expiration date, Commodore Business Machines. 

and signature. N.C. residents add 3% sales tax. 



I CA\Wr1IIM« I V/vLO .Microcomputer Services 

Dept. CM81 

P.O. Box 12679 

Research Triangle Park. N.C. 27709 

(919)851-2374 



In Canada, conlact: 
S.E.S. Compuling Inc. 
267 Bain Avenue 
Toronto, Ontario M4K-1G2 
(416) 463-5302 



52 



COMPUTfl 



March, 1961. Issue 10. 



We did it, we wrote the program and ran it. Here is 
what happened. 




OUTCOME FREQUENCY PROPORTION 



2 


23 


.02h 


3 


62 


.062 


(+ 


81 


.081 


5 


lf(9 


.109 


6 


l't0 


.m 


7 


11*2 


.U2 


8 


137 


. 137 


99 


126 


. 126 


10 


BH 


.08 


11 


72 


.072 


12 


27 


.027 



If you have the time, try 10000 rolls, or 20000 rolls, 
or even 100000 rolls. Compare the proportions with 
the proportions you wrote down lor Exercise 13. Or, 
compare with our answers for Exercise 13. ^ 



DISK DRIVE WOES? PRINTER INTERACTION? 
MEMORY LOSS? ERRATIC OPERATION? 

DON'T BLAME THE SOFTWARE! 




ISO-1 




ISO z 



"A "^ -^^t 

Power Line Spikes, Surges & Hash could be the culprit! 
Floppies, printers, memorv & processor often interact! 
Our unique ISOLATORS eliminate equipment interaction 
AND curb damaging Power Line Spikes, Surges and Hash. 
'ISOLATOR (ISO-1 A) 3 filter isolatec? 3-prong sockets; 
integral Surge/Spike Suppression; 1 875 W Maximum load, 

1 KW load any socket S56.95 

•ISOLATOR (lSO-2) 2 filter isolated 3prong socket banks; 
(6 sockets total); inte^al Spike/Surge Suppression; 
1B75W [Max load, 1 KW either bank S56.95 

•SUPER ISOLATOR (fSG-31, similar to IS0-1A 

except double filtering & Suppression .... $85.95 

•ISOLATOR (ISO-41, similar to ISOl A except 

unit has 6 individually filtered sockets .... $96.95 

•ISOLATOR (ISO-5), similar to ISO-2 except 

unit has 3 socket hanks, 9 sockets total . . . $79.95 

•CIRCUIT BREAKER, any model (add-CB) Add S 7.00 

•CKTBRKR/SWITCH/PILOT (CBSI . . . Add S14.00 

TOLL FREE ORDER DESK 1-800-225-4876 

(Eicspl Ma, HI, Ak, Pr, Canada) 

/S7 Electronic Specialists, Inc. 

171 South Main Street. Nalieli. Mass. 01760 ^'■P*- L 1 

TECHNICAL & NON-800 AREAS 1-617-655-1532 



Microphys Programs 

PET 

f,o Software Specialists APPLE 

Tv Science and Education r~*) 

ik. 



Microphys fs pleased to announce the availability of its 
educational software for use with the Commodore PET/CBM 
and Apple/Bell & Howell microcomputers. These programs 
have been successfully employed in Chemistry, Physics, 
Calculus and Mathematics classes on both the high school 
and college levels. 

The programs are supplied on C-10 cassettes and are 
accompanied by complete instructions so that even those 
with little or no computer experience nnay immediately utilize 
the software in their classrooms. Each cassette retails for 
$20 and may be obtained from leading computer dealers or 
directly from Microphys. 

Each Physics and Chemistry cassette has both a computer- 
assisted and individualized-instruction program recorded on 
opposite sides of the cassette. The CAI program guides the 
student through interacts with the computer and receives 
immediate evaluation of his responses and/or assistance 
when needed. The I/I program generates a unique set of pro- 
blems for each student. The computer can supply answers 
so that the student may check his own work. If the teacher 
directs the computer to suppress these answers, the student 
completes his work at home and then feeds his results into 
the computer which grades his work, supplying the answers 
to those questions incorrectly solved by the student- NOTE: 
each time a particular program is run, a different set of 
numerical values is generated. In most instances, an entirely 
new problem is presented. The Mathematic and Calculus 
cassettes have only the individualized-instruction feature. 

For those using disk drives, the programs have been 
coherently grouped and are available on diskettes. The price 
of each diskette is S180 which represents a considerable 
savings with regard to the individual cassette price. 

A partial list o* the programs available appears beiow. 
Please write for the Microphys Winter Catalog which 
describes the complete line of educational software for use 
on the PET/CBM and Apple/Bell & Howell microsystems. 



C ALCULUS CA SSETTES 

PC726 Diflerentialion ot Algebraic Functions 
PC72/'Wa5(ma'Minima Probtems: Part I 
PC728MaxirTia/Mintrna PtoDlems: Part l| 
PC729Beiaiive Raie Problems Part I 
PC730Relaiive Rate Problems: Part II 
PC731 -Integration of Algebraic Ftinclions 
PC732 DiHereniiahon of TrigonDmetnc Functions 
PC733lntegfationa1 TriganometFic Functions 
PC734lntegration: Areas of Piano Figures 
PC735-lntGgration: Volumas ot Solids 
PC736lntec;ratiOn: Arc Lerigiiis 
PC737lntegra1ion: Surface Areas or Sotids 



PHYSICS AND CHEMISTRY CASSETTES 



1 Linear KmemaliCS 

2 Projeciiie Motion 

3 Momenlum and Energy 

A Energy and Ihe Inclined Plane 

5 InelaslJcColtisions 

6 CeniMpefai Force 

7 Pulley Syslems — Mactimes 

8 Specific Heat Capacily 
9. Calorjmeifv 

10 Heals of Fusion/Vapoi'i2al!on 

1 1 Specific Gas Laws 

12 General Gas Laws 

13 Thermodynamics. I 
Id Tfiermodynamics II 

16 Transverse StanOirg Waves 

16 Longiludinai Slanding Waves 

17 Lenses aid Mirrors 

18 Refraciion nf Light 

19 Series Circuit Analysis 

20 Parallel Circuit Analysis I 
20A Parallel Circuit Analysis li 



21 Series Parallel CircuM Analysis 

22. Faraday's Law 

23 GfSffvMotecuJar Mass 

24 Thfl Mole Concepi 
25, TtieMotarityCoficepi 

26 The Normalily Concepi 

27 TheMnlaliiyConceot 

28 Siioclnomelry: Mass/Mass 

29 SioictiiOfneuy: Mass/Volume 

30 Sioicriiomeiry: Voiurne'Volurrie 

31 Sioictiiomeiry: General 

32 Perceni Concenlration 

33 pKConcepi 

3J EMF uf Electrochemical Cells 

35 Electric field Analyses 

36 Phoioeiectric ETfecl 

37 Symbols and Valence Drill 

38 Names of Compounds Drill 
39, Formuias ot Compounds Drill 
40 Total Internal Reflection 



PhyiiCl T OlIhvllB cintwrs Ifip r i|i'^*inij a'fjqrani 
• 2 ] * ^ ^i ; a 9 lU 301 30i JOS. 306 
Phyvicill D>tk«1l| i:i.Mli|ini't!~l,.i|,.Ai.i(j[i. ,Tr,ln. 
■il 1.^ 11 U I'j f., If 1,B ly ^11 ?0A ?1 3^ Ih t'-' 



Microphys Programs 

2048 Ford Street 
Brooklyn, New York 11229 

(212)646-0140 



COMPUTE! 



Now The PET'S Know How To Share 

MUPET MULTIUSER SYSTEM 




EDUCATION 

* allows direct access to any 
programmes or data files 

* reduces media cost - one set 
of disks needed for up to 8 
users 

* disk based languages such 
as Assembler, Pascal, Word 
Processing, available to all 
users 

BUSINESS 

* true multi-station 
wordprocessing with access 
to common data files 

* cost per station drastically 
reduced 

* printer spooling Is 
supported 

MANUFACTURING 

* using optional DOUBLE 
MGPET, both local and 
common IEEE devices are 
supported 

* test equipment can be 
controlled locally, while 
reports and programmes are 
managed universally 



MUPET 

USES 

NO 

NONE 

NOT ANY 

NOT ONE BYTE 

OF 

SOFTWARE 



*««*««««« 



YOU CAN RUN 

ANY COMBINATION 

OF PROGRAMMES 

OR LANGUAGES 

AT THE SAME TIME 

• word processing 

• Pascal 

• Assembler 

• Future??? 



MUPET supports any 
combination of CBM 
hardware — present or 
future — which supports the 
IEEE bus 

MUPET plugs in externally. 
No need to open the 
PET/CBM cabinet 

MUPET supports all existing 
and future CBM disk based 
software 

MUPET supports printers as 
well as disks 

MUPET supports all 
versions of Commodore 
Basic 



PET/CBM Trademark ol 
Commodofe Business Machines 



CMD 

CANADIAN MICRO DISTRIBUTORS LTD. 

365 Nl^in 5|f«l. Milton. Onurici L'JIIIP? Jib fl7fl-7277 



54 



COMPUTE! 



March, 1981. Issue lO. 



A CAI program 
called 
LINEAR 
EQUATION 

Peter Oakes 
Muskegon, Ml 

This article is about Computer-Assistcd-Instruction 
or commonly called CAI programming. My example 
program is called LINEAR EQUATION. It is writ- 
ten for an 8K PET computer. Since it uses a 
minimum of graphics I believe it could be modified 
for many other small computers. 

The Program Has These Features: 

choice of using the computer monitor or a printer. 
choice of 6 different randomly generated problems, 
problem solutions complete with step by step pro- 
cedures for solving. 

Program Description 

Lines 100-106 simply announces the program. 

Line 108 makes the RND {random number generator) truly 
random for the "older" original ROM PETs, 

Lines 110-122 asks if the user wants to use a printer. If this 
option is executed, then the problem question and solu- 
tion (and procedure) will be written to the printer. 
Everything else is still done on the monitor. Figure 1 
shows a sample output for a printer. Of course, a similar 
output would appear on the monitor if the printer op- 
tion is not executed. 

Lines 124-144 ask for the problem type the user wants gener- 
ated. Line 144 forces the user to answer only with a 
1,2, 3, 4, 5, or 6. A similar control occurs in line 118 mak- 
ing sure the user answers with Y,N, or T. 

Lines 146-168 gets the random data to generate the problems. 
Line 152 generates a random number V(I) in the range 
[-11.0 to -I- 11.0] excluding [-0.9 to +0.9] 

Lines 158-168 calculate specific problem data. 

Example: XI = INT(-V(2)/V(1)' 100 + .5)/100 calculates 
the x-interccpt of a line rounded off to hundredths by 
the underlined portion of the statement. 

Line 172 opens the PET to a device (ie: opens to write to 
the monitor or printer depending on the value of U8 
from lines 114-116). Line 172 also clears the monitor if 
the printer is not used. Line 174 prints a "divider" bet- 
ween problems if a printer is used. Line 176 will GOTO 
the printing of the selected problem as does line 250 
print the appropriate solution. 

Lines 234-250 checks (on the monitor) to see if a solution is 
wanted. 

Note that in the printing of signs care has been taken 
to print the appropriate - or + sign. An example is 
found in the subroutine at lines 402-406 (as used 
from line 264). If T had a value of -7.2, then the 
subroutine would make T$ be -7.2 whereas if T had 



a value of 7.2, then T$ would be made -h 7.2 which 
assures the correct printing of T$. 

The rest of the program lines are unique to what 
each line does and would take too much space to ex- 
plain every detail. I'll let the reader read those lines 
over on his own. I hope this program will be of value 
to the reader as CAI programs can be very helpiul in 
mathematics. Figure 2 shows a complete listing of the 
prograrn with graphics noted. 

Figure 1 



GUIEN: 


SLOPE = 9.2 
V-If{TERC£PT ( @..-5.t. > 




FIID: 


ft:+&-,'+c=8 mm b=-i 




also: 


X-IlffERCffT. 





USING: V - VI = H(X - XI) 
M^ 11 = SLCiPE LT T\£ IM 



MN V + 5.6. = 9,2 ( 
V +5.6= 9.2 ;^ 
8 = 9.2 K - V - 



) 



D.b (EM^TIffi) 



IF V=8: = 9.2 a - B - 5,t 
6= 9.2K-5.fe 
^-2 X = -5.& 
X= .61 



THLG 

Figure 2 

100 

102 



( .61 .. 8 ) = !<:-IlffERC£PT 



104 

106 
107 
108 
109 
110 
112 

114 
116 
118 

120 

122 
123 
124 
126 

128 

130 



PRINT"fiLINEAR EQUATION" : PRINT"PETER 

-.OAKES, 10-1-80, 7K 
PRINT :PRINT"PROGRAM GENERATES -> 

-.LINEAR EQUATION 
PRINT"PROBLEMS AND PROVIDES A -. 

-^SOLUTION 
PRINT "PROCEDURE. 

U9=RND(-TI) :REM RANDOMIZE RND 

:REM USE PRINTER ? 

PRINT: INPUT"USE PRINTER ( Y,N, T) " ;Q$ ; 

-.IFQ$="T"GOT0388 
IFQ$="Y"THENU8=4 :GOTO120 
IFQ$="N"THENU8=3:G0T0126 
GOSUB392:GOT0112 
PRINT :PRINT"WHEN PRINTER IS READY - 

-.PRESS rSPACEr KEY 
GETQ$:IFQS=""G0T0122 

:REH PROB CHOICE 

PRINT"fiWANT TO SOLVE A LINEAR -. 

-lEQUATION GIVEN 
PRINT" 1. SLOPE & Y INTERCEPT 
PRINT" 2. SLOPE & A POINT 



Perfectly Bcdsmced 



educationcd software 



MICRO-ED 




More than 200 instructional programs 



Unless otherwise specified, each one can be 
purchased for ^7.95 



You may wish to order tapes by the MICRODOZEN. Any twelve S7.95 tapes can be 

purchased for $84.00. 



All programs work wilh any 
8K PET, old or new. 



Send for free catalogue: 

MICRO-ED, Inc. • P.O. Box 24156 • MinneapoHs, MN 55424 
or telephone us at (612) 926-2292 



PET is the registered trade- 
mark for Commodore Busi- 
ness Machines, Santa 
Clara. CA. 



56 



COMPUTEI 



March. 1981. Issue 10. 



132 
134 
136 
138 

140 
142 

144 

145 
146 



148 
152 

154 
155 
156 
158 

160 
162 

164 

166 

168 



169 
170 
172 

174 

176 
177 

180 
182 
184 
186 

188 
189 
192 

194 
196 
198 
200 

201 

204 

206 

208 

210 
212 
214 
216 
218 
220 
222 
224 



PRINT" 3. TWO POINTS 
PRINT" 4. X & Y INTERCEPTS 
PRINT" 5. PARALLEL LINE & A POINT 
PRINT" 6. PERPENDICULAR LINE & A -. 

-.POINT 
PRINT" T. TERMINATE THE PROGRAM 
PRINT: INPUT"WANT TYPE: 1,2,3,4,5,6, 

-.OR T";Q$; IFQ$="T"GOT0388 
N=VAL(Q$) :IFN<10RN>60RINT(N}<>NGOT01 

-.42 



:REM DATA 

-.V(2)=B 

-lORD ' S 
FOR 1=1 TO 4 
V(I)=INT(RND(1)*100+ 

-.IP RND(1)>.5 THEN 
NEXT I 



-100<V(I) <100; V(1)=M & - 
IN Y=MX+B,- V(3) & V(4)=X- 



CO 



,5)/10+l: 
V(I)=-V(I) 



:REM ASSIGN VARIABLES 
Xl=INT(-V{2)/V(l)*100+.5)/100: 

-iREM X- INTERCEPT 
Y1=INT{ (V(l)*V(3)+V(2))*100+.5)/100: 

-.REM Y-COORD AT A POINT 
Y2=INT( (V{1)*V(4)+V(2) ) *100+ . 5 ) /100 : 

-.REM Y-COORD AT ANOTHER POINT 
B1=INT{ (V(4)-V(1}*V(3) )*lE2+.5)/lE2: 

-.REM Y- INTERCEPT OF PARALLEL SYSTEM 

M2=INT( (-1/V{1) )*100+.5)/100: 

-.REM SLOPE FOR PERPENDICULAR SYSTEM 

B2=INT( (V(4)-M2*V{3) ) *100+ . 5 ) /100 : 
-.REM Y-INTERCEPT OF PERPENDICULAR -, 
-.SYSTEM 



:REM WRITE PROB 
0PEN1,U8:CMD1:IFU8= 

-IGOT0176 
PRINT"============= 



3THENPRINT"fi": 



ONNGOTO180,194,206,216,226,232 

:REM #1:M=V(1) ,B=V(2) , X1=X-INTERCEPT 
PRINT"GIVEN: SLOPE = "V(l) 
PRINT" Y-INTERCEPT ( 0,"V(2)") 
PRINT:PRINT"FIND: AX+BY+C=0 WITH -. 

-.B=-l 
PRINT"ALSO: X-INTERCEPT. ":GOT0236 

:REM #2:M=V(1) ,B=V(2) , Xl=X-INTERCEPT 

-. & POINT (V(3) ,Y1) 
PRINT"GrVEN: SLOPE = "V(l) 
PRINT" F("V(3)") = "Yl 
PRINT:PRINT"FIND: Y=MX+B 
PRINT"ALS0: X & Y INTERCEPTS.": 

-.G0T0236 

:REM #3:M=V(1) ,B=V(2) & POINTS: 

- {V(3),Y1) & (V{4),Y2) 
PRINT"GIVEN THE POINTS: ("V(3)", 

^"Yl") 
PRINT" ("V(4)", 

-."y2") 
PRINT:PRINT"FIND: y=MX+B" :GOT0236 

:REM #4:M=V(1) ,B=V{2) , Xl=X-INTERCEPT 
PRINT"GIVEN: Y-INTERCEPT ( 0,"V(2)") 
PRINT" X-INTERCEPT ("Xl",0 ) 
PRINT:PRINT"FIND: Y=MX+B" :GOT0236 

:REM i5:M=V(l) ,B=V(2) & POINT: 
-< {V(3),V(4)) 



226 
228 
230 

232 
233 
234 
236 
238 

240 
242 
244 
245 
246 
248 
250 
251 
252 
254 
256 



258 

260 

262 

264 

266 

268 
270 
272 

273 
274 
276 
278 
280 

282 

284 

286 
288 
290 

291 
292 
294 
296 

298 

300 
302 

304 

306 

308 

310 
312 

314 

315 
316 
318 



M$= "PARALLEL" :GOSUB432 :GOT0236 

:REM #6:M=V(1) ,B=V(2) & POINT: 

- (V{3),V{4)) 
M?= "PERPENDICULAR" :GOSUB432 

:REM WANT SOLUTION ? 
PRINT:PRINT:PRINT#1 :CL0SE1 
PRINT: INPUT"WANT SOLUTION (Y,N, 

-.T) ";Q$:IFQ$="T"GOT0388 
IFQ$="Y"GOT0246 
IFQ$="N"G0T0378 
GOSUB392:GOT0238 

:REM WRITE SOLUTION 
OPENl,U8:CMDl:IFU8 = 3THENPRINT"fi 
ONNGOTO254,276,294,318,340,356 

:REM #1 

GOSUB410 

PRINT :PRINT"THEN Y ";;T=V(2): 

-.GOSUB398: PRINT T$" = "V(l)"( X - - 

-.0 ) 
PRINT" Y "T$" = "V(l) "X 
PRINT" = "V(l) "X - Y ";: 

-iT=V(2) :GOSUB404:PRINT T$; 
PRINT" (EQUATION) ": PRINT: PRINT 
PRINT: PRINT" IF Y=0: = "V(1)"X - -. 

-.0 "; :T=V(2) :GOSUB404:PRINT T$ 
PRINT" = "V{1) "X "T$ 

PRINT" ";-V(l) "X = "VC2) 
PRINT" X = "XI 

PRINT: PRINT"THUS ("XI", ) = -, 

-.X-INTERCEPT" :GOT0376 

:REM #2 

GOSUB410: PRINT 
T=Y1:M=V{1) :GOSUB418 
PRINT:PRINT:PRINT"IF X=0: Y = -, 

-."V(l) "(0) "T$" = "T$ 
PRINT" ( ,"T$") = -, 

-.Y-INTERCEPT 
PRINT:PRINT:PRINT"IF Y=0: = -, 

^"V(l) "X "T$ 
PRINT" ";T" = "V(l) "X 

PRINT" "XI" = X 

PRINT" ("XI", ) = -. 

-.X-INTERCEPT " : G0T03 7 6 

:REM #3 

PRINT"SLOPE = M = (Y1-Y2 ) / (X1-X2) 

PRINT" = C"Y1; :T=Y2:GOSUB398: 

-.PRINT T$")/("V(3) ; 
T=V(4) :GOSUB393:PRINT T$") 
PRINT" = "V(l) 
PRINT: PRINT"THUS IN THE EQUATION: 

-. y = MX + B 
PRINT" Y = -, 

-."V(l) "X + B 
PRINT: PRINT: PRINT"THEN "Y2" = -. 

-."V(l) "("V(4) ") + B 
PRINT" "Y2" = ";INT( (V(1)*V(4) > 

^*100+.5)/100,-" + B 
PRINT" "V(2) " = B 
PRINT: PRINT: PRINT"THUS THE EQUATION - 

-.IS 
PRINT:PRINT" Y = "V(1)"X ";: 

-.T=|V(2) :GOSUB404:PRINT T$:GOT0376 



:REM #4 
PRINT "USING: 



Y = MX + B 



March. 1981 Issue 10. 



COMPUTE! 



57 



B 



COMPUTER MAGIC LTD. 

ATARI COMPUTER SOFTWARE 

(FOR ATARI. ROrv J, 400 REQUIRES I6KMEM0RY)' 

HORSEWORD DERBYtm 

COMPUTER MAGIC LTD. 

-Player against the computer 
+Action graphics 
^Attractive colors and sounds 
+Four levels of play ^ 

AVOID COMPUTER MAGIC LTD. 

+ 1 or 2 Player ACTION SPACE GAME 



+5 play variations 
+Keep ship In quadrant while trying to 
blast everyone. You can (including opponent) 
"THE BEST PLAYER WINS" 

TRIBOMB COMPUTER MAGIC LTD. 

+ ACTION GAME 

+ 1 or 2 player game. ..just try to beat 
the computer. , , 

+5 levels of play 
"THE BETTER YOU GET THE HARDER WE MAKE ITI" 

ATARI REGISTERED TRADEMARK OF ATARI INC. 

ALL ATARI 2600, 800 & 400 CARTRIDGES & 
SOFTWARE, HARDWARE, JOYSTICKS, 
PADDLES ETC.SEND FOR CATALOGE. 



COMPUTER MAGIC LTD. 

176 Mam Street Port Washinglon 
New York 11050 



NAME 

ADDRESS- 



N Y Residenis Add F'o Sales Ta« 



PLEASE SEND ME 
( )HORSEWORD DERBY — 

( )AVOID 

( )TRIBOMB 

Anoun I Enc losed 



New PACKAGED PROGRAMS 




CASCADE COMPUTERWAHE PRO- 
GRAMS are designed Jo increase your 
satisfaction and utilization of your 
Commodore Computer. Our 
professional programmers have 
created new programs for BUSINESS 
ENTERTAINIVIEt^T, EDUCATION, and 
STATISTICAL applications. Write for 
detailed infornnation: 

CASCADE COMPUTERWARE CO., P.O. BOX 2354, EVERETT, WA 98203 

Dealer inquiries imited (206) 355-6121 




PET & APPLE II USEBS 

Tiny Pascal 

Plus- 
GRAPHICS 




The TINY Pascal System turns your APPLE II micro into a 16.blt P. machine- You 
too can learn llie language that Is slated to bscome the successor to BASIC- TINY 
Pascal clfars the lollowmfl: 

' IINE EDITOR to cr«st>, Ifiodify and maintain acurca 

* COMPILER to produca P-cada, the ansombly langauaga a1 Iha p-machjn> 

• INTEBPHETER to execute Iha campllad Pcoda (has TRACE| 

' SIruclured programmed constructs: CASE. OF. ELSE, WHILE-DO, IF-THEN- 
ELSE, HEPEAT-UNTIL, FOHTOJDOWNTO-DO, BEOIN-END, MEM. CONST, 
VAR ARRAY 

Our new TINY Pascal PLUS- pEOvices graptiics and other bulltin functions: 
GflAPHICS. PLOT. POINT. TEXT. INKEY. ABS AND SQR. The PET version sup. 
ports double Oanstty plolling en 40 column sc:een giving BO !( 50 plot positions 
Trie APPLE II version supports LORES and tor ROM APPLESOFT owners tlie 
HIRES gfaohics plus otner leatures with: COLOR, MGRAPHICS, HCOLOR, 
HPLOT. PDL and TONE For those wtio do not require graphics capabilities, you 
may SIUI order our original Tiny Pascal package. 



TINY Pascal PLUS- GRAPHICS VERSION. 

PET 32K NEW Horns cassette - J55 

PET 32K NEW Roms fliskelte S50 

APPLE II 3JKHBK w/DOS 3,2 or 3-3 S50 

TINY Pascal NON.QRAPHICS VERSIONS- 

PET t6K(32K NEW Roms cassette J40 

PET t6K/32K NEW Roms dislietlB ..J35 

APPLE II w/ROM Applssolt 32K wiDOS J35 

APPLE II wfRAM Appiesoll 46K vv/DOS. , S35 

USER'S Manual iretundable With software order) SIO 

6502 Assembly Listing ol INTEHPRETER-graphics , S25 

6502 Assembly Listing of INTERPRETER-non graphics. .S2D 

r"Et S9,Uff " U 5 i-e CAM'CA [>-S*'l 
CHII4 •>■ THE SOURCE C1O011 





[i»m!!ini 



m I ] 



ABACUS SOFTWARE 

P. 0. Box 7211 

Grand Rapids, Mictiigan 



49510 



From AVANT-GARDE CREATIONS -.— -^-~ •*— -*~ 

SENTENCE DIAGRAMMING 

PARTS OF SPEECH 

USAGE 

Includes: 

• 3 Levels of Difficulty, 20 sentences per level 

• Optional Record-Keeping on Data Disk 

• Optional Print-outs of Records 

• Teacher-formatted Requirements for Advancing 
to the Next Level 

• Teacher-formatted Options to Exclude Actual 
Sentence Diagramming 

• Student Option for Record-Keeping 



tnah 




APPLE II PLUS, 48K 

1 or 2 Disk Drives 

AVANT-GARDE CREATIONS 

Dept. G9 
Box 30161 
Eugene, OR 97403 



$19.95 

VISA/Mastercharge 

•ff PHONE: 

503-345-3043 

NOON to 6 EM. PST 



58 



COMPUTE! 



March. 1981. Issue lO. 



320 
322 

324 
326 

328 

330 

332 

334 
336 

337 
338 

340 

342 
344 

346 

348 
350 
352 
353 
354 
356 
358 
360 

362 

364 
366 

368 
370 
372 
373 

374 
376 
378 

380 
382 
384 
386 
388 
389 
390 
391 
392 

394 

395 
396 

398 

400 
401 
402 
404 

406 
407 
408 
410 
412 



PRINT"AND ( ,"V(2)") 
PRINT:PRINT"THEN "V{2)" = M(0) + ■ 

-iB 
PRINT" "V(2) " = B 
PRINT:PRINT:PRINT"NOW USING: 

-. t"Xl", ) 
PRINT"IN Y = MX";:T=V(2) : 

-iGOSUB404:V2$=T$: PRINT V2$ 
PRINT:PRINT" = M("X1") ■ 

-.'■V2$ 
PRINT" "; :T=X1:G0SUB398; 

-.PRINT TS"M = "V2$ 
PRINT" M = "V(l) 

PRINT:PRINT:PRINT"EQUATION: Y = -. 

-."V(l) "X "V2$:GOT0376 

:REM «5 

PRINT"REWRITE "V(1)"X - Y "T?" = 
PRINT"AS Y = "V(l) "X "T$ 
PRINT: PRINT: PRINT"THEN SINCE -. 

-.PARALLEL LINES HAVE 
PRINT "EQUAL SLOPES TOGETHER WITH -. 

-.THE GIVEN 
PRINT"POINT: ( "V ( 3 ) " , "V ( 4 ) " ) AND 
PRINT :GOSUB410: PRINT 
T=V(4) :M=V(1) :GOSUB418:GOT0376 

:REH #6 

PRINT"REWRITE "V{1}"X - Y "T$" = 
PRINT"AS Y = "V(1)"X "T? 
PRINT:PRINT:PRINT"THEN SINCE -i 

-.PERPENDICULAR LINES HAVE 
PRINT"SLOPES THAT ARE NEGATIVE -i 

-.RECIPROCALS 
PRINT"THEN M = -1/("V(1)") = "M2 
PRINT:PRINT"THUS TOGETHER WITH THE -i 

-.GIVEN 
PRINT"POINT: ( "V(3 ) " , "V ( 4 ) " ) AND 
PRINT:GOSUB410: PRINT 
T=V{4) :M=M2:GOSUB418 

:REM ANOTHER PROB ? 

PRINT : PRINT: PRINTtl tCLOSEl 

PRINT: INPUT" ANOTHER PROBLEM (Y, 

-.N) ";Q$:IFQ$="N"GOT0388 
IFQ$="Y"GOT0384 
PRINT :GOSUB394:GOT0378 
IFU8=3THENPRINT"fi 
GOT0124 
END 

:REM SUBROUTINES 
:REM USE {Y,N,T) 
PRINT :PRINT"USE T TO TERMINATE THE -. 

-.PROGRAM OR" 
PRINT"USE Y FOR YES OR N FOR NOI": 

-.RETURN 

:REM T — >"-T",T>0 OR T — >"+T",T<=0 

T$="-"+STR$(T) :IF T<0 THEN T$="+"+ST 

-.R$(ABS(T) ) 
RETURN 

:REM T — >"+T",T>0 OR T — >"-T",T<=0 

T$="+"+STR$(T) :IF T<0 THEN T$="-"+ST 

-iR$(ABS(T) ) 
RETURN 

:REM PROB HEADER 

PRINT"USING: Y - Yl = M(X - XI) 

PRINT"WHERE H = SLOPE OF THE LINE 



414 

415 

416 
418 

420 
422 

424 
426 

428 
429 
430 
432 
434 

436 



PRINT" (XI, Yl) = A POINT ON ^ 

-iTHE LINE":RETURN 

:REM WRITE SOLUTION 

PRINT" Y "; :T1=T:G0SUB398: 

-.Y1$=T$: PRINT Yl$" = "M" ( X "; 
T=V(3) :GOSUB398:PRINT T$" ) 
PRINT" Y "Yl$" = "M"X "; : 

-,T=INT(M*V(3)*100+.5)/100:GOSUB398 
PRINT T$ 
PRINT:PRINT" Y = "M"X " ; : 

-.T=INT( {-Tl+T) *100+.5)/100:GOSUB398 
PRINT T$" (EQUATION) ": RETURN 

•REM WRITE PROB 

PRINT"FIND: Y=MX+B THAT IS "MS" TO 

PRINT:PRINT" "V(1)"X - Y " ; : 

-.T=V(2) :GOSUB404:PRINT T?" = 
PRINT: PRINT" CONTAINING -. 

-,("V(3) ","V(4) ") ":RETURN 




<ompa< 
low, this Ri 
GP 90 "Woodpea 
gives you an extra bonu! 
usually reserved for 
regiilar-sizc printers 
80 Characters per line! 

"Woodpecker" features an efficient uni-hammer printer head, 5x7 
matrix, and was designed for interface to Apple and olhers. It uses 
an economy-weight, continuous-lorm paper and will make up to 
three copies (including the original). 

"Woodpecker's" mark set for sharp graphic reproduction and 
character set for 128 character (alpha-numeric and synibols| print- 
ing give full printer capabilities. 

Call today for more information or to place your phone order: 
(■115) 326-9100 • 39 Town & Country Village. Palo Alto. CA 94301 . 

We honor Waster Ctiarge, Visa. Chech oi money order iCalifornta fesjden.s add 
6 5'»t sales tax) 



£\L) SYsrauis formulate cdrporation 



March, 1981. issue lO, 



COMPUTE! 



59 



Sample Execution 



mm: SLCPE - -l.b 

V-IHTERCEF7 ( 9.-7.5 ) 

FI*: av*,'-K;=8 WITH E!=-l 
fl50: X-IWTERCEFT. 



Glta IK POihTS; ( 1. 



-2.y .>-it!.34 ) 



Fill): '■,'=S';+e 



FI«): V=fE':+e THiT IS msiill TO 
1,9 y. - V - S.'3 = s 
COTftlHIt-fi (-2.& ..-5 ) 



LtSIHG: V - V! = tKX - Kl) 

(>;i..Vi) = fl POIKT m TfE LI[€ 

Tf£H V + 7.9 = -l.fr ( K - 8 ) 
V + 7.9 = -1.6 K 
8 = -1.6 X - V - 7.9 (EaiRTIOH) 



IF v=ei fi = -1.6 ;<: - § - 7.9 

9 ? -l,b K - 7.9 
3.6 K = -7.9 
X = ^.94 

THL15 iH,94 .. e ) = X-IhTO>C:F'T 



SLOPE = H = (VI-V2)/';KI-S) 

= < 12,62 + 16,34)/( 1.2 + 2.9) 
= 5.6 

TRtS IH T}€ ECilflTim: V = W. + B 
V = 5.6 X + B 



TJBI -16.34 = 5.6 (-2.9 ) + B 
-18.34 = -16,24 + B 
5.9 = B 



THUS M Etmm IS 

V = 5.6 X + 5,9 



mmT£ 1,9 K - V - 3.9 = 8 
FS V= L9X -8.5 

THEN SINCE PfiRHlEL LliCS HFHE 
EQLa SUKS TOffiTffi? yiTH T}£ GIiJD^ 
POINT: (-2.6 ..-5 ) flf€) 

USIHG: V - VI = M<X - XI > 

UHERE H = SJ.OPE OF T>E LH-E 

(XL VI) = fi POIf^ m THE LIIC 

V + 5 = 1,9 ( X + 2,6 ) 

V + 5 = 1.9 X + L% 

V = 1,3 X - .86 (EC^fiTiaO 



Glie-J: SLOPE = 10,3 

F( l.S ) = 17.eH 

FI«): WK+B 

FLSO: X 4 V II-JTEF;r£F'TS, 



GUiEN: V-IHTERCEPT ( 9.-18.6 ) 
X-IUfTERCEPT ( 7.87 ..8 ) 



FIH>: '-M^.^ 



FIM): 'i'=S':+« TlftT IS PERPBOlClim TO 

-6,1 X -V + 5.1 = 

CONTfllNIHG (2.1 . 6.S ) 



USING: V - VI = N(X - XD 

(XLV!) = R POIKT m J\£ LIME 

V- 17.84 = 18.3 ( X- i.S ) 
V- 17.04 = 16,3 X - 18.54 



IF X=e: V = 10.3 (6) - 1.5 = - 1.5 
( 8 .- 1.5) = V-INTERCEPT 



IF V=8: 0= 18.3 X- 1. 
1.5 = 10.3 X 



L6ING: V = MX + B 
AH) ( ..-10.6 > 

Tf€H -18.6 = WSi) + B 
-10.6 = B 



\m mm •: 7.07 , 8 ) 

IN V = 1'^:- 18.6 

= m 7.67 ) - 10.6 
- 7,07M = - 10.6 
H = 1.5 



EQLfiTICtJ: V= 1.5 X - 18,6 



RECITE -6,1 X- V + 5.1 =0 
flS V = -6.1X + 5.1 



Jmi SIfCE PERPBDICtW; LltCS mjE 
SLOPES THfiT flffi hEGflTIi^ RECIPRCQIS 
TICN M = -l/(-6,I ) = ,16 

THIS l^mVER yiTH Tl£ GIi,ej 
POINT: ( 2,1 .. 6,3 ) AND 

USING: V - VI = K(X - XD 
(*EfiE M = SLOPE Cf T}£ LIf£ 

(5CLVU = fi KiM en Tl£ LI}€ 

V-6.8= .16 < X-2.1 ) 
V-6.3= .16 X - .34 



,15 . 8 ) =X-MEK£PT 



.16 X + 6.46. (EQLWia-O 



60 



COMPUTE) 



March 1981. Issue lO. 



Hex 
Conversion 

Using The 6502's 
Decimal l^ode 

Jack Clarke 

Since the advent of 8 bit microprocessors, the hex- 
idecimal numbering system has been around to help 
provide a shorthand notation for binary numbers . . . 
remember 4 binary bits can be expressed with just 1 
hexadecimal character? (F = lUIj) 

While this shorthand notation has revolutionized 
Assembly Language coding, undoubtedly many a 
new computerist has cursed the notation as pro- 
blematical, confusing and cumbersome. 

To assist the programmer (old and new), 
elaborate tables have been generated to convert the 
radix of a number from one base to another . . . 
remember radix and base are synonymous? To fur- 
ther the cause of this translation, numerous programs 
have been written in higher level languages. Take a 
look at Texas Instrument's hand-held 
"Programmer" which has gained a commendable 
respect in the programming community. Have you 
ever tried to poke or peek with your Apple without 
one of the above? 

What is this decimal mode you ask? Simply 
defined it is a clever bit of binary manipulation that 
is performed inside the microprocessor to insure that 
when you add, a "1" to a "9" that the resuh is "0 
with carry" and not "A", {also known as BCD 
coding). In other words, 4 binary bits can express a 
decimal number thru 9, (10 thru 15 is illegal). So 
an eight bit number provides numbering thru 99. 

Now, let's take a closer look at the 6502's in- 
struction set and see how the decimal mode can help 
with this numbering conversion. 

A "bit" of examination reveals that the decimal 
mode only works when performing an add (ADC) or 
subtract (SBC) instruction. All other instructions 
simply ignore the decimal mode. Take for example 
the increment/decrement instruction. It performs an 
addition or subtraction (by one) but always in the 
binary/hex mode. Now, what would happen if we 
combined a decrement/increment instruction with an 
add/subtract instruction. The increment instruction 
would count up one in hexadecimal while the add in- 
struction would simultaneously count up in 
decimal . . .did I just see a hex to decimal conversion 

go by? 

How about an example? Suppose you wish to 
convert the hex number "AO" to the equivalent 
decimal number. (Don't pull out your conversion 
tables yet). Follow the flow chart in Figure 1 and 
walk through the steps. First set the decimal mode 



(SED), clear the accumulator (LDA IMM) and 
clear the carry flag (CLC). Next, load the x-register 
with the hex number to be converted (LDX AO 
IMM). Now, the conversion starts. Decrement the 
x-register (DEX) and test for zero (BNE). If the 
x-register is >0 then add 1 to the accumulator (ADC 
1 IMM). Repeat the sequence until the x-register has 
counted down to 0. When you examine the contents 
of the accumulator you will find the decimal 
equivalent of "AO" sitting there quietly. If you need 
a hex equivalent of a decimal number you would 
enter the decimal number in the accumulator and 
subtract one in the decimal mode. . .each time you 
subtract you would also increment the x-register. See 
any similarities? 

For numbers greater than 99 you would perform 
the addition or subtraction using two or more 
memory locations and keep track of the carry flag, 
(double precision arithmetic). The X and Y registers 
could also be cascaded for extended range with 16 
bits. Conversion of 0000 thru FFFF could be easily 
implemented. 







STAIIT 








i 








SET DECIMAL FLAG 


(SED) 






1 








CLEAR CAHRV FLAG 


(CLC) 






1 








CLEAR ACCUMULATOR 


ILDA m 






i 








LOAD I.VDEX 

ReClSTEK WITH HEX NUMBER 

REGISTER WITH HEX NUMllFR 

TO BE CON\'ERTEU 


(LDX lAO) 




> 






ACTUAL CONVERSION 
(3 Inilfxiclioni) 






V 






ADD 1 TO ACCU.MULATOH 


(ABC »1) 




I 






DECREMENT INDEX REGISTKH 


(DEX) 




V / IS THE \ 

INDEX REGISTER 






> 
\ (BNEI / 


















FINISHED 





Hex To Decimal Conversion 



March. 1961. Issue lO. 



COMPUTE! 



The best way to familiarize yourself with this 
type of approach is to try it on your own computer. 
After gaining a little confidence in the ease of the 
conversion, you will soon find the same techniques 
incredibly helpful in more complex operations such 
as multiplication and division. Take the example of a 
program that is sampling the rate of an asynchronous 
input ... By knowing the "sample time" of your pro- 
gram (each time you read the port) and adding that 
constant instead of "1" you effectively convert and 
multiply in one operation resulting in a decimal for- 
matted "total number of samples" 

To summarize the concept of radix conversion 
using the 6502 's decimal mode, start with zero in the 
accumulator and index register and add "I" to the 
accumulator (decimal mode) and increment the index 
register at the same time. You will observe the ac- 
cumulator counting up in decimal and the index 
register counting up in binary/hex. 

Say good-bye to those dog-eared tables and long 
involved conversion programs that you have been 
using. The 6502 takes another bow. © 

Are you using your 

computer in an 

interesting application? 

Write about It for 

COMPUTEI 




MIPLOT: 

the right 
plotter 
at the 
right 
price 



Designed for straight forward Interface to any micro- 
computer that outputs the ASCII code, IVIIPLOT can even 
be used by operators with no plotter experience. 

• Incorporates pre-programmed ' inlelligent" lunctions required 
for producing graphs and drawings 

• Solid and broken line types can be specilied 

• Buill in character generator (or letters, numbers and symbols 

• Characters can be enlarged and rotated to four orienlations 

• Special printer mode outputs character data as-is 

• Uses commonly available hard fiber-tip pens 

■ Maximum plot speed approximately 2 inches per second 

• Built in self-test mode 

OnlyM,200 

at Systems Formulate Corporation 
(plus shipping & handling! 



Call today tor more information or to place your phone order: 
(4f5) 326-9100 • 39 Town & Countfy Village. Palo Alto, CA 94301. 
We honor Wasler Ctiarge Visa check or money ofdei iCalitorma restdents add 
6 5'c sales la;() 



\. J »TbwnVCcKD3bT'VmA«i«Fi]oAKo.C»llftrrnuat301 



ECHO SERIES™ speech synthesizers 

COMPUTERS ARE SPEAKING OUT I 

Now you can add intelligible speech to your computer 
without using vast amounts of memory! The ECHO 1 P" 
speech synthesizer for the Apple* is the first of a 
series of synthesizers based on the same technology 
that made the Speak & Spell* * a success. 

The initial operating system allows the creation of 
your own vocabulary with phonemes (word sounds) 
while using very little RAM memory (approx. 800 bytes 
-f 20 bytes/word). Enhanced operating systems and 
vocabulary ROMs will be offered as they become 
available. 

The ECHO ][™ comes complete with speaker, instruc- 
tion manual, and a disk containing a speech editor, 
sample programs, and a sample vocabulary. Sug- 
gested list price is $225. 



See your dealer or contact: 




IsEcJ 



STREET ELECTRONICS 
CORPORATION 

'Trademark of Apple Computer 



3152 E. La Palma Ave., Suite C 
Anaheim, CA 92806 (714) 632-9950 

** Trademark of Texas Instruments 



62 



COMPUTE! 



March. 1931, Issue lO. 




Clearing The 
Apple 11 
Low-Resolution 
Graphics 
Screen 



Sherm Ostrowsky 

Many applications require rapidly clearing the low- 
resolution graphics screen to black (COLOR = 0) or to 
some other color. In the latter case the process might 
be more accurately described as "back-grounding". 
Either way, this apparently simple operation can be 
done by several different methods. Each method will 
produce a distinctly different visual effect while in 
operation, although the end result will be the same. 
By doing the experiments to be described below, the 
experienced programmer can learn how to use the 
method best suited to his immediate purpose, and the 
novice programmer can learn some useful facts about 
the operation of the Apple low-resolution graphics. So 
go ahead and do the experiments on your Apple; you 
can't hurt it by pushing the keys (even the wrong 
keys), and you can learn a lot. 

First of all, in order to see the effect of any kind 
of screen-clearing method it is best to begin with a 
screen that is loaded with colors and forms. You may 
do this in any way that pleases you; I have been using 
the following subroutine in Applesoft: 

1000 GR 

1010 FOR I = TO 39 
1020 FOR J = TO 39 
1030 COLOR = 1 + INT(15'RND(1)) 
1040 PLOT J, I 
1050 NEXT J, I 

1060 FOR PAUSE = TO 2000: NEXT PAUSE 
1070 RETURN 

Notice that this subroutine colors-in the so-called 
"mixed screen" — the top 40 lines, but not the bot- 
tom part reserved for text. If you wish to use, and 
color-in, the whole screen (48 graphics lines), then the 
first two lines of the Applesoft subroutine can be 
amended to: 



1000 POKE -16302,0 : POKE -16304,0 
1010 FOR I = TO 47 

etc. The line of POKEs turns on the "soft switches" 
governing the full-screen lo-res graphics (see pages 
12-13 in the new Apple II reference manual). 

Now that the screen is colored, let's clear it. The 
first method which is likely to occur to the average 
programmer is to write a couple of lines in Applesoft. 
Suppose you want to clear the screen to a particular 
background color, say C (C = to 15), A program to 
do this for a mixed screen might look like this: 
10 GOSUB 1000 : REM PAINT THE SCREEN 
20 COLOR = C 
30 FOR I = TO 39 
40 VLIN 39,0 AT I 
50 NEXT I 
60 END 

Try it. The screen clears rather ponderously, like a 
stage curtain rolling across from left to right. If you 
want the curtain to move from right to left, just 
change line 30 to 
30 FOR I = 39 TO STEP -1 

If you want it to operate on whole-screen graphics, 
line 40 should be altered to 
40 VLIN 47,0 AT I 

This method works fine, if you don't mind the 
relatively slow speed of the clearing operation. In fact, 
for some special effects it might even be preferred. 
Notice how you can control the direction of motion of 
the apparently rolling curtain. As an "exercise for the 
student", consider how you might change lines 30 and 
40 so as to cause the curtain to appear to be rising up- 
wards. That can be a rather pretty effect, especially if 
you don't just leave a blank screen but instead "paint- 
in" a scene of some kind to coincide with the rising of 
the curtain (i.e., one horizontal line at a lime, from 
bottom to top); it can look like a real stage curtain ris- 
ing to reveal a scene already in place. 

But what if you are not satisfied with the rela- 
tively slow speed with which an Applesoft ])rogram 
can clear the screen? If you don't mind being 
restricted to just a basic black clear, there are some 
dandy machine-language subroutines in the Apple's 
built-in ROM Monitor which are a lot faster. For 
mixed-screen graphics, try this little program: 

10 GOSUB 1000 : REM PAINT SCREEN 
20 CALL -1994 
30 END 

That's not only a heck of a lot faster, but pretty sim- 
ple to use, too! If you're doing lull-screen graphics, 
replace line 20 with 
20 CALL -1998 



fems 



is PROUD TO ANNOUNCE A NEW ADDITION 

TO OUR FAMILY! 




(Formerly Superscript) 



Superscribe is the most powerful and easiest to use Word Processor available for your Apple II or II Plus 
computer. Besides leaping tall buildings in a single bound it: 



Gives true upper/lower case text on your screen with no ad- 
ditional hardware whatsoever. 

Works with documents larger than the amount of memory in 
your Apple - transparently to you! 

Edit not only letters but also any text or binary file, or even 
basic programs! 

Automatically generates up to 4 separate indices for your 
document! 

Save typing time through a unique ability to designate specified 
keys as commonly used words, phrases or even commands! 



• Globally search for or replace character strings. 



• Superscribe has a built-in instruction capability such that if 
you forget how to use a command and the manual is not close 
by - you may simply ask Superscribe! 

• Supports multiple disk drives! 

• Will support alternate character sets. 

• Produces form letters using address files easily! 

• Supports the shift key modification if made to your Apple. 

• Lets you work with your text on a screen at a time basis - 
reducing typos and allowing you to see your document as you 
edit it. 

• Works with any printer! 

• Supports the language card or any 16K expansion Ram card 
to keep more of your document readily available in memory. 



Superscribe is 100% machine language and requires only a 48K Apple II or II Plus with a disk drive. It may be 

purchased through your local computer store or direct from us by sending $89.95 plus $2.50 to cover shipping 

to: 

ON'LI NE SYSTEMS - 36575 Mudge Ranch Road - Coarsegold, CA 9361 4 - 209-683-6858 COD., ivlaster Charge or Visa accepted 



M 



COMPUTE! 



March. 1981. Issue lO. 



Very neat. But this way you have no control over the 
direction of motion of the curtain, nor over the color 
to which the screen is cleared. Perhaps for your par- 
ticular application neither of these restrictions makes 
any difference, in exchange for the very real advan- 
tages in speed and simplicity. 

If you'd like to have your cake and eat it too, this 
can be arranged by POKEing a short machine- 
language subroutine into memory. Then you will be 
able to select your background color and still retain 
the speed advantage of the Monitor subroutine. You 
don't have to know anything about machine- 
language to do this, although for those who are 
curious ril explain how it works in a few minutes. 
For the moment, just try the Applesoft program 
below: 

10 GOSUB 1000 : REM PAINT SCREEN 
20 FOR I = 768 TO 782 : REM POKE M/L SUB 
30 READ J : POKE I, J 
40 NEXT I 

50 COLOR = C : REM YOUR CHOICE OF COLOR . 
60 CALL 768 : REM CALL THE SUBROUTINE 
70 END 

200 DATA 160, 39, 132, 45, 160, 39, 169, 0, 32, 40, 248, 
136, 16, 248, 96 

For full-screen graphics, replace the second number 
in the DATA statment ("39") by the number "47". 

If you RUN this program you'll see that it 
works just like the Monitor version, except that now 
the screen clears to the selected color, C, instead of 
only to black (C =0). It should perhaps be pointed- 
out that once you have POKEd this subroutine into 
the computer by executing lines 20 through 40, you 
can CALL it any number of times in your program 
without having to POKE it in again. Lines 20 - 40 
only have to appear and be executed once in each 
session at the computer. 

Although quite fast, this screen-clearing opera- 
tion is by no means instantaneous: you can still 
perceive a curtain-like movement across the screen. 
What if that's not good enough? I recently wrote a 
game program in which I wanted the screen to flash 
suddenly white, to indicate that an enemy torpedo 
had broken through my screens and wiped me out. 
Even the machine-language routines are too slow to 
make a believable explosion flash — an instan- 
taneous white-out. Well, this can in fact be done 
with the help of a somewhat longer machine- 
language subroutine which I will now describe. And 
if you're not into writing game programs, you might 
still like to be able to clear your screen instan- 
taneously to provide nice sharp transitions from one 
scene to the next. 

The new program looks like this: 

70 FOR PAUSE = TO 2000 : NEXT PAUSE 

80 GOSUB 1000 : REM REPAINT SCREEN 

90 FOR I = 800 TO 844 : REM NEW SUB 
100 READ J : POKE I J 
110 NEXT I 
120 COLOR = C 

130 CALL 800 : REM CALL NEW SUBROUTINE 
140 END 



300 DATA 16,'}, 48, 160, 120, 32, 43, 3, 160, 80. 32, 61, 

3, 96, 136, 153, 0, 4, 153, 128, 4, 153, 0, 5, 153, 128, 5 

310 DATA 208, 241, 96, 136, 153, 0, 6, 153, 128, 6, 153, 0, 
7, 153, 128, 7, 208, 241, 96 

For full-screen graphics, replace the ninth number 
in DATA statement 300 ("80") by the number 
"120" 

As before, once this new subroutine has been 
POKEd into memory it can be CALLed whenever 
you need it without having to rePOKE it (unless, of 
course, you happen to overwrite it in the 
meanwhile). This subroutine has been clelibcrately 
placed into different memory locations than the 
previous one, so they can coexist in your computer. 
Furthermore, the Applesoft routines associated with 
these two different methods were written in such a 
way that when both have been typed into your com- 
puter as indicated, they will run consecutively. When 
you type RUN, the screen first fills up with colors, 
pauses for a few seconds, and then is erased by the 
first machine-language subroutine. Then the screen 
fills up with a new random color pattern, pauses, 
and is suddenly cleared by the second subroutine. 
The speed difference between these two subroutines 
is readily apparent in operation. 

Each of the several different screen-clearing 
methods which have been described above has its 
own special properties; they are all useful additions 
to your programming arsenal. 

Now, for those who are interested, let me briefly 
discuss the functioning of the two machine-language 
subroutines. I will assume that the reader is at least 
somewhat familiar with 6502 Assembly Language 
and its standard notation. 

The first subroutine, starting at location 768 
decimal (equivalent to $0300 in hexidccimal) is ju.st a 
very slightly altered version of the Monitor's routine 
which we used earlier by CALLing -1994. The 
Monitor version clears the screen by drawing vertical 
black lines one after another, exactly as we did it in 
our very first Applesoft program. The diffci-cnce in 
speed between these routines simply reflects the well- 
known speed advantage of machine-language over 
Basic. Since the Monitor's version only paints in one 
color — black — it was changed to permit the color 
to be an input variable using the standard Applesoft 
COLOR = C instruction to define which one you 
want. In Assembler notation, this subroutine looks 
like this: 

Sn:!(10: AO 27 BKGRND LDY *S27 ; Maximum Y tor misfd-sfrci-n 

clear 
U:l(12: 84 2D STY V2 ; Sinrc as liiii-bdlltMii loordinalc 

O.KM; .AO 27 LUY *$27 : Rishlmosl X-ciiiird (column) 

0.10fi: AS 00 CI.RSCR L0.A f$00 ; Will start ck-ariiiK a( top 

0308: 20 28 F8 JSR VLINE ; Jump to linc-drawins subruutinc 

030B; 88 DEY ; Next leftmost X-cimrd (column) 

030C: 10 F8 BPL CLRSCR ; Loop until done 

030E: liO RTS ; Done. Return 

For full-screen graphics, the number "27" in loca- 
tion $0301 is replaced by the (hexidecimal) number 
"2F". 

The alert reader may have noticed that the color 
to be used did not appear anywhere in this 



PROGRESSIVE SOFTWARE 

Presents 
Software and Hardware for your APPLE 



vu#i 

• Accepts data from VISICALC* 

• Relocates data and names 

• Connects data and names 

• Creates an out file that can be loaded into VISICALC* 
Written by: MARC GOLDFARB S49,95 
Add $4.95 for Postage and Handling. 

VU #2 

Includes all of the features of VU 5^1. VU #2 is a utility 
program for VISICALC* that has a built-in execute file 
that operates the program automatically and allows the 
user to do repetitious functions, such as payroll comput- 
ing, etc. Written by: 

MARC GOLDFARB S59.95 

Add $4.95 for Postage and Handling. 

VU #3 

Includes the abilities of VU #1 and VU #2 but has addi- 
tional superb features. This program will allow the user to 
enter data into VISICALC* from any program merely by 
inserting data into an array Iwhich is well documented in 
the instructions). Then the program places the array into 
VISICALC". VU #3 will also transfer data generated from 
VISICALC' into any of the user's programs via an array 
(as defined in the instructions). Written by: 
MARC GOLDFARB $69,95 

Add $4.95 for Postage and Handling. 

Menu Planner - Has many types of dishes, counts calories 
for each entry. Prints out or displays menus with daily 
calorie count. Written by: 
GARYA. FOOTE S19.95 

Shopping List - Creates a list that can be used for food 

shopping or any other group of items. Allows user to 

create and save files of other items Prints out list. Written 

by: 

CHARLES HEARN $19.95 

Apple Menu Cookbook — Index accessed data storage/ 
retrieval program. Recipes stored, unlimited lines per 
entry. Easy editing. Formulated after NY Times Cook- 
book. Other useful features included. Written by: 
WM. MERLINO, MD $19.95 

Data Organizer — Alphabetize and maintain any data list 
up to 1,000 entries. Searching feature. Written by: 
EDHOWERTON S14.95 

*VISICALC is a trade-mark of Personal Software, Inc. 



• Programs accepted for publication. 

• Highest royalty paid. 



FILES 

• Builds Serial Files 

• Changes Serial Files to Random Access Files 

• Adds to End of Serial Files 

• Record Insertion and Deletion Anywhere In Serial File 

• Move Individual Records or Blocks of Records within 
Serial Files 

A File manipulator that allows the user to search for a 
string within a file, sort data by blocks, handle many files 
at a time (without exiting the program) and saves exe- 
cuted files. A file can be saved under many names, viewed 
in several modes, and dumped (totally or partially) to a 
printer. 

If you would like to work with files you must own this 
program I Comes with 10-page documentation in a binder. 
Because of the size and weight of this program, postage 
and handling charge is necessary. Written by: 
MARC GOLDFARB FILES-Disk only. $49.95 

Add $4.95 for Postage and Handling. 

Super Sort and Search — A free-form data base package 
which allows the user to define fields per record. As the 
data is loaded In, it is automatically sorted. Can also 
merge together files or allow key sort entries. Will sort 
out in particular field, do a generic search and/or search 
for a specific piece of data. Will allow each particular 
record or records to be printed. Written by: 
MARC GOLDFARB $69.95 

Add $4.95 for Postage and Handling. 

Matching Patterns — Choose two colored patterns that are 
exactly the same. Music response on correct patterns. 
Higher degree of accuracy produces longer melody before 
changing to more complex pattern (4 levels). Increases 
awareness of contrast and comparison. Written by: 
JUDYPEGG Disk $19.95 



TO ORDER 

Send Check or Money Order to: 

P. O. Box 273 

Plymouth Meeting, PA 19462 

Pennsylvania residents add 6% sales tax. 

POSTAGE AND HANDLING 

Please add $1.50 for the first item and $1.00 for each 
additional item. 

U.S. and foreign dealer and distributor inquiries invited. 
All programs require 16K memory unless specified. 



215-279-4438 



NIBBLE/NUMBER 8/1980 33 



66 



COMPUTE! 



March. 1981. Issue lO. 



subroutine. In fact, the Applesoft statement COLOR 
= C automatically stores the appropriate color con- 
stant in location $30 {decimal 48), where the Monitor 
routine VLINE can get at it. VLINE draws a single 
vertical line of the specified color. 

Now, the flash-clear subroutine beginning at 
location 800 decimal ($0320 hcxiclecimal) works by 
taking advantage of the "memory-mapped" nature 
of the Apple's low-resolution screen. Each of the 
1600 screen positions on the mixed screen or the 
1920 screen positions on the whole screen is defmed 
by a specific half-byte (four bits, or one "nybble") in 
memory. Since these four bits can represent one of 
sixteen different hex numbers ($0 through F), each 
screen position will have one of sixteen different col- 
ors depending on how the defining nybble has been 
set. The two nybbles in each byte define the color for 
two screen positions in the same column but con- 
secutive rows, that is, two vertically-stacked colored 
squares. To color a given square it is only necessary 
to find its corresponding nybble and set it to the ap- 
propriate value. 

Unfortunately, for some reason the Apple 
designers didn't arrange the memory locations in any 
simple consecutive fashion to correspond to the 
screen rows in numerical order. It requires a special 
algorithm to find the byte which represents the first 
square of each row; all the rest of the squares in that 



•••••••••••••••• 

Bugs in your Apple? 

DDT 

Disco-Tech's Disc Drive Timer program 

zaps disc drive problems! 

COHRECT 
SLOW 200 FAST 

!9T0C ZHDO Z«90a | 301 OC 301 CO 3th3 90 

ll II III II llll II III lllll llllll ill 



Analyze disc drive motor speed on a routine basis with 
an adjustable real-time speedometer. Accurate to onc- 
tenth of one r.p.m. out of 300 r.p.m. 
Fine-tune disc drive motor speed yourself. All you need 
is DDT, two screwdrivers, and five minutes' time. 

^QQ95 Engineering Business 

M*^" Potrpaid Architecture Utilities 

Califnrnid ri:kMJ^-:it« jifd (I't. ISK Surveying 
Diskette & complele manual 

Also available for TRS-80 Model I. 

To order or for more irrformation, 
write or call 



18003 

^^^ T.M. 



microcomputer 

products 
a division of 



Morton Technologies, inc. 

1 1 50 Coddingtuu'n Center 

P.O. Box 11129 • Santa Rosa. CA 95406 

707/523.1600 



row will be represented by consecutive bytes after 
that. To further complicate matters, the last eight 
bytes in every 128 bytes do not correspond to any 
screen positions at all, but rather are used as 
"scratchpad" memory for whatever devices might be 
in the motherboard slots. 

This last little detail makes the required 
subroutine for clearing the screen much more com- 
plicated than it would otherwise have to be. It is 
necessary to take the byte in location $30, which 
represents the chosen color nybble repeated twice, 
and store it in each byte of screen memory, being 
careful not to disturb those special bytes %vhich are 
possibly being used as scratchpad- The address of the 
first and last effective byte of each row in screen 
memory has to be known in advance in order (o per- 
form this operation in the fastest possible time, 
without taking time to compute these addresses dur- 
ing the operation. All this has been done in the 
algorithm represented by the assembly-language 
subroutine below: 



. Get selected color byte 
Prepare to fill 120 bytes 
Fill four sets of 120 byles each 
Prepare lii fill 80 bylcs 
Fill four sets of 80 Ijyu-s eiich 
Done. Hclurn. 

; Subroutine FILLl puts the selected color byte into 

j each of four sets of 120 consecutive scrccn-mcmflry 

: bytes, bein^ careful to avi»id the .scratchpad bytes at 

; the end of each set. 



S0320: 


AJ30 


FLASH 


LDA COLOR 


0322: 


.\0 78 




LDV i*S78 


0324: 


20 2D 03 




JSH FILLl 


0.127; 


AO iO 




LDV |<S.50 


0329; 


20 3D 03 




JSK F1I.L2 


03 2C 


liO 




K'lS 



032D: B8 FILLl 

032E: 99 00 04 
0331: 99 80 05 
0337: 99 80 05 
033 A: DO Fl 
033C: 60 



DEY 

STA J400. Y 

STA 1480, Y 

STA $500, Y 

STA $580, Y 

BNE FILLl 

RTS 
: Subroutine FILL2 puts ihc selected color byte into each 
: of four sets of 80 consecutive screcn-incTtsory bytes. 
: These arc the "shiirl lines", leas-tng i»ut at the end of 
: each one of the four text lines at the bottom of the 
: mixed screen. 



033D: 88 FILL2 

03;)F,: 99 00 OG 
034 1 ; 99 80 0(i 
0344; 99 00 07 
0347; 99 80 07 
034A: DO Fl 
034C: 60 



DEY 

STA $G00. Y 
STA $680, Y 
STA $70<t, V 
STA $780, Y 
BNE FILL2 
RTS 



For full-screen graphics, the "short lines" of the 
subroutine FILL2 become full-length lines as in 
FILLl, which is accomplished simply by changing 
the constant "$50" in location $0328 to a "S78". 
And that's how we clear the screen in a flash. 
But before I quit, I'd like to leave you with one more 
little idea. If, instead of . setting the color byte by an 
Applesoft line of the form COLOR = C, you simply 
POKE into location 48 (decimal) any integer less 
than 256 (decimal), you may get a surprise. Depen- 
ding on what integer you POKE, the .screen may 
"clear" to a pattern of horizontal stripes! I'll bet that 
some clever reader out there will find some in- 
teresting and unexpected application for it. © 



March, 1981. Issue lO. 



COMPUTE! 



67 




16KRam 
Expansion 

Board for the 

Apple II* 

$195.00 

• expands your 48K Apple to 
64K of programmable 
memory 

• works with Microsoft Z-80 
card, Visicalc, LISA ver 2.0 
and other software 

• eliminates the need for an 
Applesoft* or Integer Basic 
ROM Card 

• switch selection of RAM or 
mother board ROM 
language 

• includes installation and use 
manual 

• fully assembled and tested 



Visa and MasterCard accepted 

Shipping and handlins will be added unless 

the order is accompanied by a check or 

money order 
N.C. residents add 4% sales tax 

"Apple II and Applesoft are trademarks of Apple 
Computer, Inc. 




n 



INCORPORATED 

P.O. Box 19144 
Greensboro, NC 27410 
(919) 852-1482 



"Formerly Andromeda Computer Systems 



m 



COMPUTE! 



March, 1981. Issue lO. 



Fun With 
Apple and 
Pascal 

Gene A Mauney 
Greensboro, NC 

While using Kenneth Bowles' excellent textbook, 
Problem Solving Using PASCAL, to self teach 
Pascal, it occurred to me to write this game program 
and make learning Pascal even more exciting. Since 
completing this writing I have discovered that 
Bowles' 1980 book, Beginner's Guide for the 
USDA Pascal System, would have helped and I am 
sure will be helpful with my next Pascal ventures. 

I tried to use as many of the Apple-Pascal 
graphics functions as feasible in order to gain ex- 
perience with these and of course depended on the 
Apple Pascal Reference Manual for this. From 
TURTLEGRAPHICS used arc: MOVE, 
MOVETO, TURN, TURNTO, GRAFMODE, 
TEXTMODE, VIEWPORT, FILLSCREEN, 
TURTLEX, TURTLEY, WCHAR, and CHAR- 
TYPE. And from APPLESTUFF the RANDOM, 
PADDLE, BUTTON, and NOTE functions. 

My plan was to use as much as would fit in with 
my study of the beginning lessons in Bowles' text- 
book along with developing a program for a game 
suggested to me by Peter Hildebrandt, to whom goes 
my appreciation. Also thanks to Bill Stanley for his 
helpfulness. In these beginnings 1 found that it would 
have been very helpful to have had some real Apple- 
Pascal programs for examples. So my hope is that 
this real program will be helpful for those readers 
who are beginners as I. No claims are made as to the 
most efficient methods for programming and I am 
sure that others will be able to find improvements. I 
will be happy to hear from anyone who has com- 
ments and suggestions. I hope programmers and 
players will enjoy it. 

The Program 

BEGIN(*MA1N*) first draws the Pentagon War 
Games frame using the TURTLE, then proceeds to 
the MOVEPENT PROCEDURE. The program 
switches back and forth between MOVEPENT and 
IFPADDLE. MOVEPENT creates the pentagons 
beginning at a random start point (AX, AY) with 
SIDE = 1 , and moving from there in random ways 
increasing by SIDE + 3 (*NOTE6*) each time 
for nine times. Here is a place to change the dif- 
ficulty level for the player if you wish. NINE counts 
the times through to know when nine pentagons 
have been formed and also to know the score 



for adding up totals. IFPADDLE accesses the paddle 
position and moves the gun. At two places (*NOTE 
4*) the TURTLEGRAPHICS procedure, CHAR- 
TYPE{6), is used to turn off the previous position of 
the gun and bullets by XORing the image. CHR(ll) 
is the up arrow used for gun and bullet. If BUT- 
TON(O) is pushed so is TRUE, the IFBUTTON 
PROCEDURE produces the four bullets with sound 
each. Hit or miss is determined {*NOTE 5*) by 
using the last value of X, the lower left corner of the 
pentagon and the last value of SIDE along with the 
paddle position. If a hit is made, NINE, SCORE 
and TSCORE are added up, destruction of the pen- 
tagon is shown along with sound (*NOTE 3*), and 
the message shown. The TURTLEX and Y func- 
tions are used (*NOTE 2'*) to determine the X,Y 
value of the pentagon corner for the destruction pic- 
ture and 20 lines are used here. The procedure 
FILLSCREEN is used (*NOTE 1*) to erase the last 
pentagon just before the destruction image. Finally, 
after five pentagon attacks, the end message is shown 
along with the total score. 



PROGRAM PENTAWAR; 

USES TURTLEGRAPHICS, APPLESTUFF; 

VAR 'JCQRE, TSCORE, X,Y, 

NINE, SIDE, PENTA: ■ INTEGER; 



PROCEDURE 

BEGIN 

TEXTMODE 
WRITELN< 
WRITELN; 
WRITELNC 
WRITELN; 
WRITELN ( 
WRITELN < 
WRITELN( 
WRITeLN< 
WRITELrJt 
WRITELN< 
WRITELN < 
WRITELN; 
WRITELN ( 
WRITELN; 
WRITELN < 
WRITELN) 

END; 



THEEND; 

; WRITELN; WRITELN; 

' * * * PENTAGON WARS * * « ' ) ; 

WRITELN; 

YOUR TOTAL SCORE IS '..TSCORE); 
WRITELN;WRITELN; 
'DIRECTIONS; '); 
'YOU WILL SEE 5 PENTAGON ATTACKS. ') i 

GET ONLY 5 SHOTS. ' ) ; 

IS 45 IF YOU HIT THE' ) ; 

PENTAGON OF EACH ATTACK.'! 

AS PENTAGONS ATTACK.)'): 
GAME PADDLE 0. ' ) ; 



'YOU WILL 

•MAXSCORE 

' SMALLEST 

' (9,8,7,.. 

'USE APPLE 

WR1TELN;WRITELN; 

PRESS RETURN THEN R FOR' 



A NEW BANE. 



GOOD LUCK ! ' ) ; 



PROCEDURE MISS; 

VAR TIME; INTEGER; 

BEGIN 

TEXTMODE; WRITELN; WRITELN; 

WRITELN; WRITELN; WRITELN) 

YQU MISSED 



WRITELN (' 
WRITELN; 
WRITELNC 
WRITELN ( ' 
WRITELN; 
WRITELN {' 
WRITELN; 
WRITELN; 
FOR TIMEi 



ONLY ONE SHOT PER 
BETTER LUCK NEXT 



ATTACK. 
TIME. ' ) 



) S 



PRESS BUTTON TO 
WRITELN; WRITELN; 
WRITELN; WRITELN; 
= 1 TO BOO DO 



CONTINUE. ' ) 



BEGIN END; 



(*WAIT BUTTON RELEASE*) 



March, 1981 Issue lO. 



COMPUTE! 



69 



REPEAT NINE:= 
UNTIL BUTTON (0) ; 

FOR TIME;= 1 TD 200 DO 

BEGIN END; 
END; 



(«MAIT ABAINUi) 



, ANGLE, 
,DUR,TII>1E: 



INTEGER; 



<*NOTE 1*> 



(*NOTE 2*) 



=TURTLEY; 



;WRITELN; 



IS 



, SCORE) 



PROCEDURE HIT; 
VAR HITS, LENGTH, 
TX, TV, PITCH, 
BEGIN 

SCORE: = NINE ^- 1; 
TSCORe:= TSCORE + SCORE; 
VIEWPORT (2, 277, 90, 180> ; ' 
FILLSCREEN(BLACK) ; 
VIEWPORT (0,279,0, 191) ; 
MQVETO(X,Y); TURNT0(90)? 
LEN6TH:=21; ANGLE: =120; 
DUR:=1; PITCH: =40; 
FOR HltS:= 1 TD 20 DO 
BEGIN 

PENCOLDR (WHITE) ; 
MOVE (LENGTH) ; 
TX:=TURTLEX; TY: 
PENCOLOR (BLACK) , 
TURN (180); MOVE ( LENGTH > ; 
MOVETO(TX,TY) ; 
TURN (ANGLE); 

LENGTH: =LENGTH-1 ; ANGLE: =ANBLE-2: 
NOTE (PITCH, DUR) ; PITCH: =PITCH-2; 
END; (*NOTE 3*) 

TEXTMODE; 

WRl IELN(WRITELN;WRITELN 
WRITELNv ' A HIT 

WR1TELN;WR1TELN; 
WRITELNC SCORE 

WRITELN;WRITELN; 

WRITELNC PRESS BUTTON TO CONTINUE.') 
WRITeLN;WRITELN; 

WRIT£LN;WRITELN;WRITELN;WRITELN; 
FDR TIf1E:= 1 Td' 800 DO 
BEGIN END; (»WA1T 
REPEAT NINE:= 
UNTIL BUTTON (0) ; 
FDR TIME:= 1 TO 200 DO 
BEGIN END; 
END; 

PROCEDURE IFFiUTTDN; 

VAR PX,BUL. TWO, PITCH, DUR: 

BEGIN 

PX:= (PADDLE(0)+19) ; 

MDVETO(PX, 20) ; 

FDR PITCH: = 40 TO 50 DD 

BEGIN 

DUR:=1; NOTE (PITCH, DUR) ; 
END; 

FOR BUL:=: 1 TO 4 DD (*4 BULLETS*) 
BEGIN 

TURN TO (90) ; 
MOVE (20) ; 

FOR TWO:= 1 TD 2 DO 
BEGIN 

CHARTYPE(t) ; 
WCHAR(CHR(11) ) ; 
TURNTO(IBO) ; 
MOVE (7) ; 
END; 
END; 

IF (PX > X) AND (PX <: 
THEN BEGIN HIT; 
END 

ELSE BEGIN MISS; 
END; 
END; 



(*TURN UP*) 



(*NOTE 4*) 



(X+SIDE) ) 
(*NOTE 5*) 



Apple Monitor Extender 




APPLE II 16K, CASSETTE 

This utility program vtotks in complete harniDny with the Apple 
monitor to extend your computer's capability and help you use 
the full power ol machine language programming. 

Screen display shows memory in HEX, ASCII or BINARY. Move 
data anywhere In memory without regard to direction or overlap- 
ping and read or write any sector on disk. Insertions may be in 
HEX or ASCII SO you can easily formal high speed text displays 
without conversions. 

Study,, modify or disassemble any program, complete with 
labels. Several programs may be combined, and the entire 
disassembled text file stored on disk/tape lor later assembly. 

The slow listing feature steps through llslings with ease. 
Copyright 18S0 Qlenn R. Sogae< All Rights Reserved. 

IftMUDII^ESP 61 S Academy Drive 
■'JS*'"*-'"* NonhbrMk. IL 60062 

iPKOUUCTS 312J564-50B0 



Computer House Division 



BUTTON RELEASE*) 


PROGRAMS FOR COMMODORE AND APPLE 




Legal accounting Demo 


$15.00 




Legal accounting Program 


995.00 


(«WAIT AGAIN*) 


Machine Part Quote Demo 


15.00 




Machine Part Quote Program 


325.00 




Mailing/phone list 


80.00 




Political Mail/phone list 


130.00 


INTEGER; 


Beams, structural 


115.00 




Trig/Circle Tangent 


110.00 




Spur Gears 


35.00 




Bolt Circles 


25.00 




Filament Wountj TAnks 


125.00 




Scrunch 


25.00 



PROGRAMS FOR COMMODORE ONLY 

A/P,A/R, Job Cost & Job Est. 370.00 

Inventory 95.00 

Financial 175.00 

Real Estate Listings 265.00 

Check Writer 25.00 

File Editing Tools (FET) 65.00 

Screen Dump/Repeat 35.00 

Docu-Print 20.00 

Scrunch 25.00 

Sof-Bkup 40.00 

Sorter (Mach. Language) . 35,00 

Trace-Print 25.00 

V ari-Prini 25.00 

ASK FOR CATALOG #80-C2 Dealers Wanted 

Computer House Div. 1407 Clinton Road 

Jackson, Michigan 49202 (517) 782-2132 



70 



COMPUTEI 



March, 1981. Issue lO. 



PROCEDURE IFPADDLE; 
VAR TIME: INTEGER; 
BEGIN 

PENCDLOR ( BLACK ) ; 

MDVETa< tPADDLE(b) + 19) ,20) ; 

FOR TlriE:= 1 TD B DD 

BEGIN 

CHARTYPE(6) ; 
WCHAR(CHR< 11 ) > ; 
TURNTO(IBO) ; 
MOVE (7); 
END; 

IF BUTTON (O) THEN 
BEGIN 

IFBUTTDN; 
END; 
END; 



PROCEDURE MOVEPENT; 
VAR DRAWjEACHQNE, 

AX,BX,CX,NX,AY,BY 
BEGIN 
REPEAT 

PENTA:= PENTA+1; SCORE: = 
NINEj= 9; SIDE:= 1; BY:= 
AX:= 40+RANDOM n0D(20O); 
AY:= li6; 
PENCOLOR (BLACK) ; 
MDVETQtAX, AY) ; 
WHILE NINE ,^ DO 
BEGIN 

viewport; 1,278,90, 180) 

FILLSCRF.ENCBLACKi ; 

VIEWPORI (0.279,0,180); 

GRAFMODE; 

BX:= RANDOM MOD{i+NX); 

CX:= RANDOM htlD (i+NX ) ; 

SX:=BX-CJ; ElY:=BY+8; NX 

X:=AX-BX: Y:=AY-BY; 

SIDE:= SIDE+3; - 

NINE;= Ni:-JE-1; 

PENCDLOR (CLACK) ; 

MDVETQO.Y); TURNTQ(O); 

PENCDLOR ( WHITE) ; 

FOR EACHfjNE:= l' TQ 

BEBJN 

MOVE (SIDE) ; 
TURN (72) ; 

END; 

IFPADDLE; 
END; 

UNTIL PENTA = 5; 
THEEND; 
END; 



(#TIME*) 
(♦ADJUST*) 

(*NOTE 4*) 



INTEGER; 



NX:= 1; 



(* PENTAGON START*) 
(*9 PENTAGONS EACH*) 



(♦CLEAR SCREEN*) 



OUR NEW PROGRAM PACKAGE 
FOR THE APPLE II 
LOOKS TERRIFIC 

SO DOES THE PRICE 

Can 25 quality Apple programs cost a mere 
$24.95? 

We have a lot lo gain by almost losing our shirts Because 
we are a new and growing company, we need your business 
10 build our business. 

APPLE SACK I - Twenty-five Applesoft programs with 
everything from hires graphics to adventures. Programs 
include 5 business, 5 utility, 10 games and 5 home 
programs. 

APPLE SACK II - TV TRIVIA - Hundreds of questions 
about your old favorite TV shows from the 50 s and the 60's 
Extra points given for super stumpers. Will tingfe your 
memory celis. (Integer Basic) 

APPLE SACK III — ADVENTURES — 9 Adventures for 
excitement in your life. Travel to far away places, thru space, 
into caves, explore dungeons and fight for your life. 

EACH PACK IS ONLY S24.95 AND INCLUDES 
SHIPPING GET ALLTHREEPACKAGES FOR $49.95. 

Its not that our program packages for the Apple are so 
cheap. It's just thai the other companies are so expensive. 

ORDER YOUR SACK TODAY FROM . , 

COMPUTERMAT 

Box 1664C 

Lake Havasu City, Arizona 86403 

(602)855 3357 



=NX+4; 



(*NOTE 6*) 



DO 



(*5 SIDES*) 



(*PENTAGQN ANGLE*) 



(*AT END OF GAME*) 



& APPLE 2 Plus 



A real time high resolution, graphics game with super sound effects. 
Features three different skill levels - Novice-for beginners, 
Average-"Arcadc" difficulty and Expert-where the asteroids are at- 
tracted to your ship. Has true momentum movements & special 
design your own asteroid belt option! (NOTE: previous "Asteroids" 
owners - send In your original tape or disk [with $3 postage and 
handling] for upgrade lo Planetoids. 



BEGIN 

INITTURTLE; 
MDVETO(0,0) ; 
PENCDLOR (WHITE) ; 

M0VETa(279,0> i 
M0VET0(279, 191) ; 
MQVETO (0, 191) ; 
MDVET0(O,0) ; 
FENCOLOR (BLOCK) ; 
RANDOMIZE; 
PENTA: = 0; TSCORE 
MOVEPENT; 
READLN: 
END. 



(*MAIN*) 



(*DRAW THE FRAME*) 



Formerly "ASTEROID'a T M of Atar 

Apple 2 - 32K tape 

041-0015 $14.95 



= O; 



(*WArT FOR <RTN>*) 



Apple 2 - 32K disk 

042-0015 $19.95 

low AVAILABLE FROM 

YOUR LOCAL COMPUTER 

STORE OR SEND TO A.I. 

SEND FOR YOUR FREE CATALOG 



^^u^ OCopyrishI 1380 

.^Adventure 

VSS^ INTl HN4I lOVAl 




lONGWOOD fLA 32 750 



13051 B6i- 6913 



A DIVISION OF SCOTT ADAMS. INC 



March. 19B1. Issue lO, 



COMPUTE! 



Flipping 
Your Disic 

M, G. Sieg 

If you own an APPLE DISK II, you can double the 
storage capacity of a single mini-floppy at virtually 
no cost. The only things you need are at least two 
floppies, a hand held hole punch, and a colored pen- 
cil that will show on black. 

The trick is simple, make your single sided flop- 
py into a dual sided "flipped" floppy. 

First, let's get acquainted with the anatomy of a 
floppy disk. Externally there is a black jacket with 
several holes cut into it. The inside of the jacket is 
lined with a white fabric which can only be seen by 
prying the jacket apart a bit at the center hole. 
Through the holes, the rust colored disk can be seen. 
The rust color is a coating on a mylar surface en- 
abling the drive to read and record information much 
the same as the tape for your cassette recorder. 

The hole in the center of the jacket is the hub 
hole. This permits the disk drive motor to engage the 
disk and spin it. The long wide slot just below the 
hub hole is called the head access slot. It permits the 
read/write head and the pressure pad to access the 
spinning disk. IMPORTANT: Avoid touching the 
disk surface through this slot. Fingerprints on the 
recording surface in this area can cause I/O errors. 
Just to the right of the hub hole is a small hole 
through which the disk surface can be seen at times 
or, at other times, a hole completely through the 
other side of the jacket appears. This is the timing 
hole. Finally, in the upper right corner (if you con- 
sider the head access slot the bottom) of the jacket, 
there is a rectangular slot. This is the write protect 
notch. When the floppy is inserted into the drive, a 
mechanical switch can slip into this notch signalling 
the drive that it is OK to write on this disk. If the 
notch is not present or is covered with a piece of tape 
the disk is "write protected" thereby preventing the 
APPLE from writing anything on this disk — even 
the initialization information. 

By duplicating this write protect notch at the 
same position on the left side of the jacket, the disk 
can be turned over and the DISK II may write on 
the "flip" side. The APPLE DISK is different than 
most other drives because it ignores the timing hole, 
using the motor and 'soft' timing techniques instead. 

If you follow these instructions carefully, a good 
90% of major brand mini-floppies can be turned into 
"flipped" floppies. Place two disks in front of you 
face up on a very clean surface. Once again you are 
cautioned not to touch the recording surface through 
the head access slot. Take one of the disks and place 
it flipped over on top of the other, such that the head 



access slots are at the bottom. Align them both exact- 
ly and, with a light colored pencil, make a mark on 
the bottom disk along the inside edge of the flipped 
floppy's write protect notch. With a standard hole 
puncher, punch a half hole (i.e. no further into the 
jacket than your pencil mark) completely through 
both sides of the jacket at your pencil mark. This 
half hole is now the write protect notch for the flip 
side. The fact that this hole is round is of no conse- 
quence, since the only thing of importance is that the 
mechanical switch inside your drive can drop into a 
notch of some type. 

Test your "flipped" floppy by inserting it into 
the drive (flipped side up naturally) and doing the 
normal INIT procedure. If you get several groans 
from your drive followed by an I/O ERROR, you 
may not have your notch deep enough or you may 
have run into one of the 10% or so disks that have 
flaws in the flipped surface. If you suspect your notch 
may not be deep enough, very carefully cut away a 
little more of the jacket. You must be careful not to 
cut into the disk surface, for that may ruin the disk 
completely. Assuming you have reasonable quality 
disks, the flipped surface having a flaw will be a rare 
problem but has no solution. If you should be 
unlucky enough to have this occur first time out, 
don't be discouraged; try another disk. 

These flipped floppies may now be used exactly 
as you use all the normal disks in your collection. 



YOUR NEW 

WRITE PROTECT 

NOTCH 



WRITE PROTECT 
NOTCH 



TIMING 




HOLE 



HEAD 

ACCESS 

SLOT 



This is what your flipped floppy should look like after fol- 
lowing the procedures. 



Editor's Nole: White we've printed this article as a reader service, you 
should be wcU aware of the risks involved. Disks made far sini;te sided use 
may contain flaws on the reverse side. We can 't much for the author 's 
}0% figure. In essence, try this at your risk! RCL 



72 



COMPUTEI 



March, 1981, Issue lO. 




Designing 
Your Own 
Atari 

Cliaracter 
Sets 



Oaig Potchett 
G'eem/ich, CT 

If you want to draw boxes, or design a card game, 
then Atari's graphics characters are terrific. But what 
if you're writing an outer-space game or a music 
program? Wouldn't you prefer a rocket ship or a 
musical note to a vertical line? This article will ex- 
plain not only how to change Atari's graphics 
characters to whatever you desire, but also how to 
change any Atari character at all, from letters to 
numbers to punctuation. 

What does a character really look like? 

An Atari character, as you may already know, is 
made up of a bunch of small dots grouped close 
together. A total of 64 dots, arranged in an eight-by- 
eight square, can be used to make one character. An 
Atari "4", for example, really looks like this: 




Here, the squares colored in represent the dots that 
are used. Notice that the outside squares are not 
used. If they were, then the characters would touch 
each other when printed side by side, and would be 
difficult to read. Graphics characters can be made to 
touch, however, since side by side they could be 
made to look hke one large, continuous character. 

How does the Atari know which dots to use 
for each character? 

Somewhere in memory the Atari has a list of which 
dots are used for each character. Before we find out 
where this list is, let's see how the Atari represents 
each character in the list. 





28£432 le 


8 


4 


a 


1 





















I 


















z 


















3 


















4 


















5 


















6 


















7 



















The Atari remembers each character as eight 
numbers, each representing a row of eight dots. 
These rows I have numbered above from to 7. 
Row is always the first number, row 7 the last. 
The Atari changes each row of dots into a number 
from to 255 in the following way. Each dot in the 
row is assigned a multiple of two (fron 1 to 128) as 
its value, as shown above. To get the number for a 
given row, just add up the values of the dots used in 
that row. For example, let's look at the "4". The 
first number will be 12, since dots 4 and 8 are being 
used in row 1 (4+8 = 12). The third number will be 
28, since dots 4, 8, and 16 are being used in row 2 
(4 +8 + 16 = 28), and so on down to row 7, which 
will be 0, since no dots are being used. Before going 
on, make sure you understand how to get the follow- 
ing eight numbers as representing the number "4": 
0, 12, 28, 60, 108, 126, 12, 0. 

Where does the Atari store the list? 

Since there are a total of 128 Atari characters, not 
counting reverse characters (see Appendix C: 
ATASCII Character Set, in the BASIC Reference 




Finally! The ultimate goal in microcomputer hardware, achieved. 

A joystick with°such remarl<able realizm and control that even the thought of other joysticks virtually vanish. 

Le Stick was born from a design used in airforce test programs. Inside are motion detectors which will 
manuever your sights in any direction you want with simple one handed movements. The large red push button 
on top provides a quick and accurate firing mechanism for better response time. 

From star raiders to graphic draw programs — Le Stick 

eliminates all the frustrations you experience with the^ 
conventional two handed joysticks or keyboards. 

The joystick of the future. See and test it at -^ 
your Datasoft'" dealer today, or contact ^ 
us for more information. 

Atari Le Stick $39.95 



mm 

&m 



^XtS 



■r^SiSiSK 



sriS^ 









fiatusorc inc.. 

~"'''^^- ^^^- COMPUTER SOFTWARE 

16606 Schoenborn Street • Sepulveda, California 91343 
(213) 894-9154 



Atari Character Generator 

This new program for the Atari Computer enables you to create 
high resolution graphics in the text motje. Redefines a character 
set virtually any way you want. Ready for whatever language or 
graphics set you can devise — from ancient Japanese to Modern 
Russian. (Diskette) $19.95 / (Cassette) $15.95. 



Atari Mailing List 

Business application software for the Atari Computer, A versa- 
tile disc based system. An efficient micro format equal to those 
used for many large computers. Sorts by Zip Codes, Names, and 
stores special data for your persona! use. (Diskette) $24.95. 



74 



COMPUTEI 



March. 1981. Issue lO. 



Manual), the list will contain 1024 numbers (8 
numbers per character X 128 characters - 1024 
numbers). Look at Appendix D: Atari 400/800 
Memory Map in the BASIC Reference Manual. 
This simply describes what some of the different 
memory locations are used for. We're interested in 
the first locations, containing the "Operating System 
ROM." The Operating System is just a program 
that tells the Atari how to do everything it can do in 
the "Memo Pad" mode, simple things such as put- 
ting a character on the screen when a key is pressed, 
etc. ROM means that the program will always be in 
the computer's memory, even when the computer is 
turned off, and can never be changed by the pro- 
grammer (that's you). Unfortunately, the first 1024 
locations in the Operating System ROM (locations 
57344 to 58367) contain the list of numbers we are 
interested in. In order to change the characters we 
are going to have to change the list, which ROM 
won't let us do. There's an easy way out, however, 
and that's to move the list to a place where we can 
change it. 

Where do we move the list to? 

We need a place where the list will be safe from us 
accidentally changing it, but where we will be able to 
change it when we want to. Looking at Appendix D 
again, about halfway down the page is a box labeled 
"RAMTOP". RAMTOP points to the last location 
in user memory, the memory we have available for 
our use. What if we were to change RAMTOP so 
that it pointed 1024 locations before the end of user 
memory? Then the Atari would think that user 
memory ended at the new RAMTOP and would not 
try to put anything in memory after that location. 
We would still be able to use those locations 
ourselves though. Let's flip over to Appendix I: 
Memory Locations. If we look up decimal location 
106, we see that it contains the value of RAMTOP. 
So if we change location 106, we can trick the Atari 
into staying away from our list. Before we do that, 
however, let me point out that adding one to the 
value in 106 actually adds 256 to RAMTOP. This is 
because of something called "paging", which is too 
complicated to explain here, and not really important 
for what we're doing anyway. Just be aware that to 
move RAMTOP back 1024 locations, we need to 
subtract four (4x256 = 1024) from location 106. To 
give us some extra space in case the Atari acciden- 
tally goes a little past RAMTOP, we'll subtract five 
instead. We do this using POKE and PEEK as such 
(finally some programming!): 
10 POKE 106, PEEK (106>5:GRAPHICS 
The reason we use a GRAPHICS right after 
changing RAMTOP is because the Atari normally 
stores screen data in the locations we'll be using for 
the list (see Designing Your Own Atari Graphics 
Modes in the Sept/Oct issue of COMPUTE). If we 
don't use a GRAPHICS command to move that list 



to a new location, the screen will do strange things 
when we move the character list into place, which we 
are now ready to do (yay!). 

How do we move the list? 

Moving the list is extremely simple; we just use a 
FOR/NEXT loop and POKE the values from ROM 
into their new locations. We first need to figure out 
the value of the location of the first number in the 
new list as such: 

20 STARTLIST ={PEEK(106) + 1)'256 
Remember, we subtracted an extra one from location 
106 to be safe, so we have to add it back on to deter- 
mine the start of the list. Also don't forget that we 
have to multiply the value in 106 by 256 because of 
paging. Now let's move (!): 

30? "HOLDON...'*:FOR MOVEME = TO 102-3:POKE 
STARTLIST + MOVEME, PEEK(57344 + MOVEME): 
NEXT MOVEME 

All that's left now is to tell the Atari where the new 
list is. We do this by changing the value in location 
756, which points to the starling location of the 
character set to be used (look at Appendix I). If you 
look at location 756 at this stage (use PRINT 
PEEK(756)), you'll see that it contains the value 224. 
Again, because of paging, this really means 224 x 
256, or 57344 (surprise!), the starting location of the 
character set in ROM. So we go: 
40 POKE 756,STARTLIST/256 

A few words of warning about location 756, 
Everytime you use the GRAPHICS command, the 
Atari sets the value in location 756 back to 224. That 
means that after each GRAPHICS command, you'll 
have to execute the equivalent of line 40. No big 
deal, but if you forget . . . 

Let's change some characters! 

Before we actually make any changes, let's look at 
the order the characters are stored in the list. For 
this we'll need Appendix C again (and you thought 
you'd never use the Appendices!). Unfortunately, 
Atari chose not to store the characters in memory ex- 
actly in the ATASCII order. Almost, but not exactly: 



TYPE 


ATASCII 
ORDER 


MEMORY 
ORDER 




uppercase, 

numbers, 
punctuation 


32-95 


0-63 


graphics 
characters 


0-31 


64-95 


lowercase, 
some 

graphics 


96-127 


96-127 



As you can see, all that Atari did was to move the 
graphics characters between the uppercase and lower- 
case (they did this in order to be able to choose bet- 
ween uppercase and lowercase/graphics in modes one 
and two). In the meantime, they made our job 



March, 1981 issue lO. 



COMPUTf! 



75 



harder for us. In order to determine where a 
character is stored in memory, we have to perform a 
little mathematical wizardry on its AT ASCII value. 
In the following "formulas," keep in mind that each 
character is represented by eight numbers, which is 
why we multiply by eight; 



ATASCII 
VALUE (AV) 


MEMORY LOCATION 

(of first number) 


32-95 


(AV-32)*8 -fSTARTLIST 


0-31 


(AV-h64)'8 +STARTLIST 


96-127 


AV8 +STARTLIST 



Of course, to get the location of the original 
character (in ROM), we would add 57344- instead of 
STARTLIST. 

With these mathematical manipulations in 
mind, let's try one of the original examples that I 
mentioned. We'll change one of the graphics 
characters, let's say -^CTRL^-T, to a musical note. 
First, let's design our note: 



Z8 643Z 16 6 4 2 \ 




This may not look exactly like a note as is, but 
because of the size of the dots, it will look fine when 
printed on the screen, as we shall soon see, I'll leave 
it up to you to check for yourself that the note 
translates into the following eight numbers: 15, 12, 
12, 124, 252, 252, 120, 0. We now want to replace 
the eight numbers already in memory for 
^CTRL^T with these eight. ^CTRL^T has an 
ATASCII value of 20 (see Appendix C), which fits in 
the 0-31 category in the formula chart above. The 
first thing to do, therefore, is to add 64 (20 +64 =84) 
and multiply by eight (8x84 = 672) to give us a value 
of 672. So to change the "^CTRL^T character we 
would have to change the eight numbers in memory 
beginning with location 672 -i- - STARTLIST. We 
make this change using a FOR/NEXT loop and 
DATA statements as such: 

50 FOR MOVEME =0 TO 7:READ VALUE:POKE 672 
+ STARTLIST + MOVEME,VALUE:NEXT MOVEME 
60 DATA 15, 12, 12, 124, 252, 252, 120, 

Now, after this has been RUN, whenever we use a 
■^CTRL^T, we will have a musical note. Try it! 



Announcing 




> 



software 



from the 

authors of 

An Invitation to Programming 

exciting gomes 

and educational programs 

for kids, 

teenagers 

and 

adults 

featuring sound 

and color graphics. 



< 



available on 

guaranteed-to-lood 

cassettes 

at fine 

computer dealers in your 

area or, 

write us directly for 

descriptive materials 




Program Design, Inc. ' 

Department CA 

11 Idar Court 

Greenwich. CT 06830 

203-661-8799 



76 



COMPUTE! 



March. 1981. Issue lO. 



As an informal kind of self-test, make sure you 
understand the following two lines. Try and work out 
which character they will change, and what the new 
character will look like, before you actually RUN 
them (with the rest of the program of course): 
70 FOR MOVEME = TO 7:READ VALUE:POKE 776 
+ STARTLIST + MOVEME, VALUE:NEXT MOVEME 
80 DATA 0, 0, 60, 102, 102, 102, 63, 
As you can see, lines 50 and 70 are very much alike 
except for the initial value added to STARTLIST. 
This should light up a sign in your brain saying 
"SUBROUTINE!" If you have more than one or 
two characters to be redesigned, you should use a 
subroutine to save memory. 

A few detotis and programming hints. 

• In graphics modes one and two, to use lower 
case and graphics characters with your new 
character set, POKE 756 with STARLIST 7256 

+ 2. To go back to uppercase, etc., POKE 756 
with STARTLIST/256. 

• If you press the RESET button, the Atari will 
change the value of location 106 and put the 
display list back in place of your character set. 
Under such circumstances it is necessary to run 
the program over again in order to get your 
character set back again. 

• If a character is too complicated to put in an 
eight by eight box, then use more than one box 
(and therefore more than one character), and 
combine them in a string. For example, using 
the Atari's regular graphics characters: 

DIM BOX$(7):BOXS = " (see below) ";PRINT BOX$ 
Type BOX$ as -^CTRL^-Q,, -<CTRL^-E, -*ESC*- 
-<CTRL>'=, -<ESC*--^CTRL*-+,-*CTRL*-Z, 
-*CTRL*-C. 

Bonus: Four Colors In Graphics Mode O! 

It is possible to define a character to be one of three 
different colors (4 = 3 + background). The only 
drawback is that once you have defined the letter 
"A" to be orange, for example, all "A" 's will be 
orange, not just the ones you would like to be. 

How do we define the color of a character? It's 
really quite simple. Just as in graphics mode eight, a 
dot in an even numbered column will be a different 
color than a dot in an odd numbered column. Two 
dots side-by-side will produce yet another color. This 
is why an Atari "4" (and all other Atari characters) 
and my musical note have vertical lines that are two 
dots wide, compared to the horizontal lines that are 
only one dot wide (or thick if you prefer). If the ver- 
tical lines were only one dot wide, they would be a 
different color than the horizontal ones, unless the 
horizontal lines alternated one dot on and one dot 
off. Confused? Don't worry, just substitute the 
following variations of the musical note for the data 
in the sample program and see what they look like: 




SOFTWARE 

FOR 

ATARI 



HOME MANAGEMENT 

FILEIT by Jerry White. A Database Sysiem. Use ihis no-nonsense elec- 
tronic cataloguing system to create, add. delete, edit, print, store and 
sort different kinds of custoin files. For every need around your home. 
Disk Package runs on 2AYi and up. S29.9S disk only. 

PROGRAMMING AIDS 

BASIC RENUMBER by Fernjndo Herrera. Change lines, reierences. 
even variables!! includes BCD converter and BASIC PROG.RAM 
DECODER. $14.95 cassette; $19.95 disk. 

CHALLENGE & FUN 

SPACE CHASE by Fernanda Herrerfl. Conquer the Galaxy. .. il you 

can escape :ho deadly chase ol the patrol Jleet. 4 levels, 

TIME BOMB by Fernando Herrera. Beat the clock m a Mine Fiejd, 5 

levels — any number oi pUyers — scoreboard lists top players. 

MINDTRACE by Lee jacknow. II you like Simon you will love this 

chdllenge...a real test for your memory. 

DOTS-N-BOXES by Lee Idcknow. You played il as a kid... it's better 

on a compu'er. 

Buy I game for 39.95 cassette; $14. 9S disk 
Buy 2 games for $14.95 cassette; S19.95 disk 
Got all 4 games... S24.9S cassette; $29.95 disk 

EDUCATIONAL 

MY FIRST ALPHABET by Fernando Herrera. Before you send 
your kid to school he or she will know all the letters, numbers, 
musical tunes, animals. , .even typing and hew to run a 
program!! Program allows parents to use built-in drawings or to 
design their own. $29.95 disk only. 

SEND CHECK OR MONEY ORDER TO: 

SWIFTY SOFTWARE, INC. 

P.O. BOX 641 
MELVILLE, N.y. 11747 



Alan is a Tradomdrk o! j 



I. RESIDENTS ADD 7^^ SALES TAX 




Software for the Atarit 
SPELLBOUND , 



lA 



^n t'xlremelv versatile, u^er or! 
enlL'd progratn for dny grade 
level Ccin be used with KXiiting 
diitti bjsu, user created data, or 
additional data cassettt-s. 
It features: 

• Learning level - holds a word 
on th« screen For you to study. 
* Test It'vel- flashes the word on 
the screen lor you to spell, 
i Comes with a data base ol the 
most Ifecjuently misspelled 
words 
• Create yooT own data base. 
Store the words on cassette lor 
lulure use 
I Change the words in the data 
base with one ol the additional 
cassettes that are available. 



SPELLBOaMD SI 5.00 

(mditct protjram with most 
Irequently misspelled wo(ds) 
BASIC 24 K 
SB DATA TAPE »1.... $5.00 

t short voxels long vowels) 
SB DATA TAPE* 2 . 55 00 
(short vowels long vowels 
bl-r-'nds) 
/ SB DATA TAPE "3 ^5 Oil 



/ 



SPELLBQCIND DATA TAPES ioi 
low a phonetic sequence. Tape 
= 1 begins with short vowel three 
letter words and progresses to 
long vowel lour letter words The 
words on each cassette continue 
this sequence. AH words in this 
series are grouped phonetically 
and by grade level whenever pos- 
sible. All DATA cassettes contain 
3!X) words 



Grcides2 4 (blends hLird ^ 
soft c) 
SB DATA TAPE "4. . S5.00 
Grades 2-4 (diprthongs 
homonyms) 
SB DATA TAPE ^5 55 00 

J (silent letters endintjs 
' tumpound words) 
SB DATA TAPE '6 S5 00 

Grades 3 5 {more dipthongs 
double consonants) 
SB DATA TAPE*? ,. 55 00 
Grades 4-6 (compound words 
endings) 
SB DATA TAPE 'B . . 55 00 
Grades 4 G (word snot covered 
in previous unit?^) 
All Data Tapeb Require 
The Spellbound ^\a^ter Program 




March, 1981. Issue lO. 



COMPUTE! 



77 



60 DATA 10,8,8,40,168,168,32,0 




80 DATA 5,4,4,20,84,84,16,0 




Such characters will, of course, look unusual in 
graphics modes one and two, just as they look 
unusual in the above diagrams. 

You can't do a lot of experimenting with this 
"phenomena" to get such effects as multicolored 
characters. Changing the background color will 
change the colors of the columns, and thus the colors 
of the characters. Finally, if you only need one "A", 
or whatever, to be a different color, define it as a 
graphics character. 

Bonus: Upper and Lowercase In Graphics 
Modes 1 and 2. 

By now, after hopefully running things over in your 
mind, you might even suspect already how to mix 
upper and lowercase in modes one and two. If not, it 
is a painfully simple trick. Since modes one and two 
allow use of lowercase and graphics characters 
together, just redefine the graphics characters to be 
uppercase letters! You can do this by moving the up- 
percase character descriptions from the ROM list to 
your own list like so: 

35 FOR MOVEME = 256 TO 472;POKE STARTLIST + 
MOVEME + 256,PEEK(57344 + MOVEME);NEXT 
.MOVEME 

Typing a -^CTRL^A will now give us an upper- 
case "A" and so on. Of course, this is not the best 
way to do it, since we no longer have any graphics 
characters. If we know that we will only need certain 
uppercase letters in our program, then it would be 
better to move just those letters, one by one, using 



the tables given earlier in the article. In any case, we 
are now able to mix almost any combination of 
characters we wish in graphics modes one and two. 

And as the sun sets slowly In the west... 

I realize that I have attempted to cover quite a bit of 
information over the course of this article, and most 
likely was not able to explain everything to 
everyone's satisfaction. If you have zny pressing ques- 
tions with regard to what I have covered here, please 
feel free to send them to me at the above address, 
along with any constructive criticism you might also 
have, and 1'!! do my best to answer them. Good 
luck, and always remember; the Atari is your slave 
and you its master. O 

MUSIC MAGIC 
FOR ATARI® 

MUSICAL MEDLEYS • MUSICAL REPEATS 
MUSIC PATCHES • STRUCTURED BASIC 

You bought the Atari's Music Composer ' and enjoyed the 
first few songs. Then you discovered that the 10-phrase hmit 
made it impossible to repeat sections of four-voice works 
without coding them again and again. Then someone asked 
you to play a medley and you found that you had to re-code 
all the songs, A friend gave you a really super song but it 
won't load properly and you can't see where to patch it. 

Now you can do it all with MUSIC MAGIC* a software pro- 
duct from Danville Distributors for the Atari 400 or 800. 
Merge phrases to make a single longer phrase. String songs 
together to create medleys. See and correct the decimal 
values recorded by the Music Composer-' cartridge. Code 
your own music records under BASIC- 
MUSIC MAGIC- comes with a complete USER GUIDE 
which clearly shows how to use the programs. The GUIDE 
starts with a structured flow chart, gives detailed, line-by- 
line descriptions of the programs and explains why they 
work. MUSIC MAGIC® is written entirely in Atari BASIC. 
You'll find the GUIDE an excellent tutorial on structured 
programming in BASIC. 

MUSIC MAGIC*' , complete with User Guide, and a pre- 
coded medley of songs on cassette for only $9.95 plus $100 
handling, (CA residents add tax,) 

ORDER FORM: 

Name 



City 

□ VISA D MC#. 
Expires 



_State_ 



-Zip- 



Signature. 



Danville Distributors 

823 La Conda Way, Danville, CA 94526 415-320-3888 

At.ifj iidd Music Camposi'; att- Ir^demarks n( Atari. Inc 



8K BASIC ATARI™ 'p'ul'i^/. 



MS 



THREE-BASE CALCULATOR - $12.95 

Hexadecimal, Decimal, Octal, Reverse Polish 
Notation, 

AUDIBLE DISASSEMBLER - $9.95 

op-code generates o 'one. Decimal Hexadecimol. 

DECISION MAKER - $8.95 

Aids in evciluat i on of complex decisions. 



1 



Color 

Computer 
I Concepts 



ATARI is a trademark o( 
ATARI, INC, 

P.O. BOX 1206 
KENT, WA 98031 



78 



COMPUTE! 



March, 1981. Issue 10. 



Atari BASIC 

A Line 
Renumbering Utility 

D, M. Gropper, Newburgh, Indiana 

Most programmers developing a program need to in- 
sert lines of code into what they have already writ- 
ten. The current version of Atari BASIC does not 
have a "RENUM" or "RESequencc" command 
available to the user. The following short program 
was written to give the capability of renumbering 
BASIC language programs. 
Listing 1. 

9000 PRINT "RENUM UTILITY ACTIVE" 
9010 ADDR = PEEK(136) + PEEK(137) * 256 
9020 PRINT "INPUT STARTING NUMBER AND" 
9030 PRINT "INCREMENT (FORMAT X,Y)" 
9040 INPUT START.INCR 

9050 LNUM = PEEK(ADDR) + PEEK(ADDR + 1) ' 256 
9060 NADDR = ADDR + PEEK(ADDR + 2) '256 
9070 IF (LNUM = 32768) OR (LNUM = 9000) 

THEN GOTO 9110 
9080 LOWNUM = !NT(START / 256) ; 

HINUM = INT(START - (LOWNUM *256)) 
9090 POKE ADDR.HINUM : POKE ADDR + 

1, LOWNUM 
9 too START = START + INCR: ADDR = NADR : 

GOTO 9050 
9110 PRINT "RENUMBERIxNG ENDED AT 

";START - INCR 
9120 END 

LINE 9010; The address of any BASIC programs' 

first line is given by the contents of locations 

136 and 137. 
LINE 9050: The first two bytes, starling at the 

address from line 9010, contain the actual line 

number. 
LINE 9060: The third byte contains the length of 

the line in bytes, so adding this to the address 

given by locations 136, 137 will give the address 

of the next line. 
LINE 9070: Here we arc testing for the end of the 

program, L = 32768, or the start of the utility, 

L = 9000 
LINE 9080: The new line number is broken into 

two bytes, 
LINE 9090: And 'POKEd' back into the line 

number bytes. 
LINE 9100; Update the line number and address 

and repeal. 
LINE 9110: All done... Let's get out of here and 

tell the programmer what the last line change 

was. 
Listing 2. 

9010 D = 256 : S = 100 : I = 10 : X = PEEK(136) + 
PEEK(137) * D 



9020 L = PEEK(X) + PEEK(X + 1) * D : N = X + 

PEEK(X + 2) : IF (L = 32768) OR (L = 9010) THEN 

END 
9030 HN = INT(S/D) ; LN = INT(S - (HN ' D)) : 

POKE X,LN : POKE X + 1,HN : S = S + I : 

X = N : GOTO 9020 

This program occupies 534 bytes. Listing 2 is the 
same thing only compacted down to 289 byics for 
those of us who get tight on memory space. A point 
to note is that listing 2 assumes starting the line 
renumbering with a line number of 100 and in- 
crementing by 10. 

A not so obvious point is that only the line 
numbers are changed and not the sequence of execu- 
tion. For example: 

Taking 

100 X = 100; ? X 
110 Y = 200: ? Y 
120 Z = 3O0: ? Z 

If we now use listing I to resequence starting with 
120 and using an increment of -10 (in otlu-i- words 
dccrcmeniing) then the end result is: 
120 X = 100: ? X 
110 Y = 200: ? Y 
100 Z = 300; ? Z 

The output on the screen on running the 

renumbered program would be: 

100 

200 

300 

, because the locations 136 and 137 still point to the 
first line which is now line number 120. The third 
byte at this address is still the length of the line in 
bytes so the next line to be executed is the now- 
numbered 110, etc. 

For those of you %vho like to experiment — take 
the above example and renumber starting at number 
1 and use an increment of 2 and then "LIST" the 
result. If you bear in mind the editing capability of 
the Atari then the reason for the "LISTed" result 
becomes obvious. 

One last point — if you do use this utility then 
please remember that you will have to manually 
change any "GOSUB''' or "GOTO" line references. C 




ATARI OWNERS 
FREE 

DifiECTOfty OF ATAR\ 

SOfTWARE k HAKDWARi 

SOUfiCfS 



P.O.BOX 64 1 
MELVILLt N.y. I 1747 



f own : 
Alori 800 O - 
400 O 



Qffier Q None O 



NAME 



ADDRESS 

cny 



. sr. 



ZIP. 



March, 1V81. Issue lO. 



COMPUTE! 



79 



SOFTWARE FOR THE ATARI 800 
AND THE ATARI 400 












TARI TREK™ 

By Fabio Ehrengruber 

Get ready for an exciting trek through space. Your 
mission IS to rid the galaxy of Ktingon warstiips, and to 
accomplish Ihis you must use strategy to guide ttie star 
strip Enterprise around stars, ttrrough space storms, and 
amidst enemy lire. Sound and color enliuen ttiis action- 
packed version of tlie traditional trek game. Nine levels ol 
play al[ow tfie player to make lire mission as easy or as 
ctiallengrng as tie wishes At the tiighest level you are also 
playing against time. Damage to your ship can be 
repaired in space at a cost of time and resources it you 
can't make it back to base. TARI TREK gives you a lot ol 
trek at a low price. This program is written entirely in 
BASIC and requires al least 24K of user memory. For the 
Atari 800 only. 

Cassette - J11.95 Diskette - JU.95 



FASTGAMMON™ 

By Bob Christiansen 

Play tjachjammon against a talented computer oppo 
nent This is the latest and best version of the most popu 
backgamraonplaying program for personal computers 
FASTGAMf<(ON. Roll your own dice or let the computer roll 
them lor you. Ad|usl the display speed to be fast or slow 
If you wish you can play a game using the same dice rolls 
as the previous game • a great aid in improving your skills 
at backgammon Beginnersfinditeasytolearn backgam- 
mon by playing against the computer, and even very 
good players find it a challenge to beat f ASTGAMMON. 
The 12-page instruction booklet includes the rules ol the 
game. Written in machine language. Requires only 8K of 
Rm and runs on both the Alan 400 and the Atari 800 

On cassette only - $19.95 



TANK TRAP 

By Don lirsem 

A rampaging tank tries to run you down. You are a combat 
engineer, building concrete barriers in an eflorl to con- 
tain the tank. Use either the keyboard or an Atari joystick 
to move your man and build walls. If you trap the tank you 
wilt be awarded a rank based on the amount of lime and 
concrete you used up. But they'll be playing taps for you 
if you get run over. There are four levels of play. Higher 
levels of play introduce slow curing concrete. citi?ens to 
protect, and the ability of the tank to shoot through any 
wail unless you stay close by. Music, color, and sound ef- 
fects add to the escilement. Written in BASIC with ma- 
chine language subroutines. Requires at least 16K of user 
memory. Runs on the Atari 800 and on an Atari 400 with 
15K RAM. 

Cassette - tll,95 Diskette ■ 114.95 



QS FORTH" By James Albanese. Step into the world of the remarkable FORTH programming language. Writing programs in FORTH is much easier than writing them in as- 
sembly language, yet FORTH programs run almost as fast as machine code and many times faster than BASIC programs. QS FORTH is based on fig-FORTH, the popular model 
from the FORTH Interest Group that has become a standard for microcomputers QS FORTH is a disk-based system that can be used with up to four disk drives. There are five 
modules included: 

1. The FORTH KERNEl (The standard fig-FORTH model customised to run on the Atari computer), 

2, An EXTENSION to the basic vocabulary that contains some handy additional words. 

3 An EDITOR that allows editing source programs (screens) using Atari type editing. 

4 An lOCB module that makes I/O operations easy to set up. 

5. An ASSEfilBlER that allows defining FORTH words as a series ol 6502 assembly language instructions. 

Modules 2-5 may not have to be loaded with the user's application program, allowing for some efficiencies in program overhead. Full error statements (not just numerical 
codes) are printed out, including most disk error statements. QS FORTH requires at least 24K of RAM and at least one disk drive. For the Atari 800 only. 

On diskette only - S79.95 

**■*****-** 

ASSEMBLER by Gary Shannon. Write your own 6502 machine language programs with this ineipensive in-RAM editor/assembler. Use the editor to create and edit your 
assembler source code Then use the assembler to translate the source code into machine language instructions and store the code in memory. Simple commands allow you 
to save and load the source code to and from cassette tape. You can also save any part of memory on tape and load it back into RAM at the same or at a different location. The 
assembler handles all 6502 mnemonics plus 12 pseudo-ops that include video and printer control. Commenting is allowed and error checkingisperformed. A very useful 
feature allov^s you to view and modify hexadecimal code anywhere in memory. Instructions on how to interlace machine language subroutines to your BASIC programs are 
included ASSEMBLER requires 16K of user memory and runs on both the Atari 800 and the Alan 400 

On cassette only - 124.95 

• •*■**■*•*** 

6502 DISASSEMBLER by Bob Pierce. This neat 8K BASIC program allows you to disassemble machine code, translating it and listing it in assembly language format on 
the video and on the printer if you have one. 6502 DISASSEMBLER can be used to disassemble the operating system ROM, the BASIC cartridge, and machine language pro- 
grams located anywhere m RAM except where the DISASSEMBLER itself resides. (Most Atari cartridges are protected and cannot be disassembled using this disassembler.) 
Also works as an ASCII interpreter, translating machine code into ASCII characters, 6502 DISASSEMBLER requires only 8K of user memory and runs on both the Atari 800 
and the Atari 400. 

Cassette -$11.95 Diskette - J14,95 




QUTiLrry sof=tw7IR6 

6660 f?eseda Blvd , Suite 105, f?eseda, CA 91335 



(213)344-6599 



^Indicates trademarks ol Atari, tnc 



HfHERE 10 GET IT: Call us a! (213) 344 6599 far Ihe name olt^e QualitySothiare (fealnr nearest 
you If necessary you may order directly from us Mastercard and Visa cairfholders ma* place or- 
ders by leleprioae Or mail your check or bjnkcaiif number la Quality Sohware, 6660 Reseda 
Blvd., Suite 105, Reseda, CA 91335. Caliloinia residents add 6% sales tai. SHIPPING CHARGES: 
Within Noith America orders must include Jl,50 lor first class shippin| and hsndlmj. Outside 
North Amcnca Ihe charge lor airmail shipping and handling is J5.00. Pay in U.S. currency. 



6© 



COMPUTE! 



March, 1981. Issue lO. 



ATARI 

Memory Dump 

and 

Dissassembler 



Robert W. Baker 
Aloo, New Jersey 

Here's a handy little utility program for the Atari 
400/800 systems. It lets you examine any area of 
memory, either RAM or ROM, in one of two for- 
mats. You can select whether you want a straight 
memory dump or a dissassembly listing. In both for- 
mats, the memory locations arc given as both 
decimal and hexadecimal values. The data can be 
displayed on the television/monitor screen or printed 
on a printer if available. 

When first run, the program takes a minute or 
two to initialize but from then on it is relatively fast. 
The starting address for the dump/dissassembly can 
be entered as either a decimal or hexadecimal 
number. When entering it as a hexadecimal number, 
precede the number by a dollar sign ($). You're then 
asked if a dissassembly is desired. Answering N for 
no will cause the standard memory dump to be 
displayed. Answering Y for yes will generate the 
dissassembly listing. 

Before the dump/dissassembly is displayed you 
are given the option to have the output printed if 
desired. Answering N for no causes the output to be 
displayed as normal, using the entire display (24 
lines). At the end of each screen you are given the 
option to continue (C), restart (R), or stop (S). Con- 
tinue will display the next screen in sequential order. 
Restarting will return to select the starting address 
and allow specifying dump/dissassembly and printer 
options. When printing the data output, the printer 
will print continuously. Just press any key on the 
Atari keyboard to halt the printer. When the printer 
stops you will see the prompt for continue, restart, or 
stop as mentioned above. 

Memory Dump 

The memory dump simply displays the contents of 
eight bytes of memory on each line displayed or 
printed. The values are given in hexadecimal to con- 
serve display space and to correspond with the 
dissassembly listings. This feature is very useful for 
examining pointers or various values stored in 
memory, that do not happen to be executable 
machine code instructions. You might want to play 
around with looking at how BASIC variables or even 



BASIC lines themselves are stored in memory on the 
Atari. 

For those with 80 column printers (Atari 825, 
etc.) you can change the FOR-NEXT loop count in 
line 600 to get 16 bytes per line to conserve paper. 
Just change line 600 to: 
FOR X - 1 TO 16:V = PEEK{A) 

You might even want to change the heading line in 
line number 302 to print the numbers to 9 plus A 
to F. 

Dissassembly Listing 

This ieature is much more powerful and can provide 
a wealth of information. When a dissassembly is re- 
quested, the program displays one 6502 machine in- 
struction per line. It indicates the hexadecimal value 
of one to three bytes of memory that make up the in- 
struction. It also displays the instruction and operand 
in the standard assembly code forms. 

Any unrecognized values are indicated by a 
"*?*" instead of an instruction mnemonic. You may 
have to try differcnl starting locations to get (he 
dissassembly to function properly. If you specify an 
address that happens to be the middle of an instruc- 
tion, it may dissassemble as a different instruction 
and/or cause following instructions to be dis])layed 
incorrectly. This is always a problem with a 
dissassembly program of this kind. It is extremely 
difficult to "sync-up" with the machine insti'uctions 
whenever there are data bytes between various 
routines, etc. If you should see a high number of 
*?*'s displayed, try another starting address, possibly 
one to two higher or lower than the original address. 
This should correct the situation. 

The dissassembly gives each instruction using 
standard MOS Technology mnemonics and address- 
ing nomenclatures. Operand values and addresses 
are shown in hexadecimal and arc prefixed by a 
dollar sign (S) as a reminder. All immediate values 
are preceded by parenthesis and indexed values are 
suffixed by a ",X" or ",Y" as appropriate. Zero 
page addressing is implied by the length of ihe 
operand being only a single byte. All branch instruc- 
tions show the actual computed target address in the 
dissassembly for added convenience. If required, the 
relative offset is shown in the object code. 

The dissassembly function is extremely useful 
for examining machine language routines such as 
those used within the BASIC cartridge itself, or in 
the operating system ROMs. I'll let you know if I 
come across anything interesting hidden in the Atari 
system. Before anyone asks — if you'd like a copy on 
cassette tape instead of doing all the typing, send $2 
to cover costs. 

Just a quick note concerning the program 
listings. The heading lines printed by the B.ASIC 
statements in lines 302 and 305 were actually in 
reverse image to enhance the display. Unfortunately 
this does not show up in the program listings. I have 



March, 1981 Issue 10. COMPUTE! 



AT-16 16K MEMORY BOARD 

for ATARI 800 

^ ASSEMBLED & TESTED 

^ READY TO PLUG IN 

COMPLETELY COMPATABLE 

^ NO MODIFICATIONS 

^ ADDS 16K OF 200NS RAM 

^ ONE YEAR WARRANTY 

ONLY $119.50 

V 32K SPECIAL 

Upgrade your system by 32K and SAVE $39.50 

2 AT-16 16K Memory Boards 

ONLY $199.50 



Ideas and products to extend 
your system inexpensively. 




8614 CHESAPEAKE DR., SAN DIEGO. CA. 92123 (714)278-0630 TWX 910-336-1869 



82 



COMPUTE! 



March, 1981. Issue lO. 



tried to use CHR$(xx) functions in the ])rint 
statements for clearing the display, etc. to make 
things easier to read. The Atari printers do not print 
the graphics and/or control charactens that can be in- 
cluded in PRINT statements. Actually they can 
cause problems if a program is LISTecl with these 
control characters imbedded in PRINT statements. 
The control characters will be decoded and acted 
upon by the printer. 

10 REM :acica;.t;.ttt?:rssc:*::f4i«:f:*:*:«:^:¥:^^:?:tt-i;;» 

29 REM 

25 REM reiORY DUnP-^-DISASSEMBLER 

30 REM 

35 RBI B'l': ROBERT W. BAKER 

40 REM 15 WINDSOR DR. ATCO KJ 08804 

50 REM 

60 REM •.m:^ U1.0 mUU 1/4/81 UU 

65 REM 

70 GRAPHICS 0-POKE 752.1 

80 PRINT CHR$( 125); " M E M R Y 

DUMP ":'? :7 

90 PRIHT "initialize: " 

100 DIM H$<16>.A$<6>.S$<6>.MI(1536> 

110 KI="0123456789ABiXEF" 

120 S$=" 

150 OPE^i #L4,0/'K" 

160 FOR X=l TO 1531 STEP 6 

170 READ A$ 

175 IF A$(2.2)=":r' T^£N h$(2.4)=":^?*" 

180 N=LEhKA$;'^IF N<6 THEN A*(N+1)=S$ 

185 ^1$(X^X+5>=A$:^€XT X 

200 PRIhfT CHR$( 125); " M E M R Y 
DUMP " = 7 ■■? 

201 PRINT "ENTER DECIMAL STARTIhC ADORES 
S"^ PRINT 

202 PRIMT "OR HEX ADDRESS PRECELED Er '$ 
"'=PRINT 

203 POKE 752.0 

204 INPUT A$^IF Al="" THEN 800 

205 IF fi$< LI ;■=■'!" Tffi^ 209 

206 FOR X=l TO LENCA*) 

207 IF A$<X.XX"0" OR A$(XA')>"9" TFBJ 2 

00 

208 NEXT X:A=INT(UAL(A$>/8>:^8 = G0T0 240 

209 A=0aF LEN':A*>(2 THEN 200 

210 FOR x=2 TO Lm.my 

211 IF A$(X.XX"0" THEN 206 

212 IF hS(X.XX="9" THEN h=A:U6+UAL(h$(X 
.X)) = GOTO 220 

215 IF A$<X.XX"A" OR Af(X,X)>"F" THEN 2 

00 

218 A=A.tl6+ASC(A*<X.X))-55 

220 f€XT X 

240 PRINT ; PRINT "IJANT DISSftSSEMELY (V/N 

) ?"; 

242 GET #LX^D=0=IF X=78 T^CN 245 

244 D=MF X089 T^£N 246 

245 PRI^TT CH?$' X) 



250 PRIhTT ^ PRINT "tlANT PRINTED COPY (Y/N 

) ?"; 

252 CLOSE #2 

255 P=0 = GET #LX 

260 IF X=78 THEN OPEN #2.S.9/'E" ^GOTO 29 



270 IF X089 THEN 255 

280 P=1:0PEN #2.8.0. "F" 

290 IF P=9 THEN PRINT CHR$(125); ^QITO 30 



295 PRIHT CHR$( 125); "DEPRESS hW KEY TO 

HALT PRINTER"^ PRINT #2 

300 PRINT #2; "LDC-DEC/HEX "; 

302 IF D=0 THEN PRINT #2; "0 1 2 3 4 

5 6 7 "^fJlTn 710 
305 PRINT #2;" OBJECT DISShSSEMBLY " 
310 PRINT #2 
320 POKE 764.255 
33Q IF P=0 THEN FOR N=l TO 20 
340 IF A>65535 THEN A=A-6553e 
350 A$=STR$(A)^L=LEN(ft$) 
3S0 PRINT #2;SS(1.6-L);A$;" "; 
370 Y=A:GOSUB 950 
^0 PRINT #2;"^ "; 
400 IF D=0 THEN 600 

410 lt=PEEK(A> 

411 GOSUB 1000: PRINT #2;" "; 
415 A=A+1 : X=( £W )+l •■ A$=rm X. X+5 ) 
420 IF A^1.1)="0" THEhJ PRINT #2;" 

";A*(2.4)^G0T0 630 
430 ttpEEKCA): GOSUB 1000 
432 PRim #2;" ";=A=A+1 
435 IF AI<1.1)="2" THEN 580 
440 PRIhfT #2;" ";A$(2.4);" "; 
445 IF A$(5.5X>"R" imi 470 
450 IF UM27 THEN U=Ci-256 
460 Y=A+U: GOSUB 908 GOTO 590 
470 IF A$(5.5)="r THEN PRINT #2;"#$";^G 
OSUB 1000= GOTO 598 

475 IF A$(6.6:'=")" THEN PRINT #2;"("; 
480 PRI^rr #2;"I";=G0SUB 1000 
482 IF A$<5.5)=" " THEN 598 
485 IF A$<5.6)="Y)" THEN PRINT #2;"),Y": 
GOTO 6^ 

490 PRINT #2;".";A$(5.6> = G0TU 638 
500 Ul=U = li=PEEK(A) = GOSUe 1000:h=A+1 
510 PRINT #2;" ";A$(2.4)." "; 
515 YKIl+(256.ai) 

520 IF A$(5.5)=")" THEN PRINT #£;"(";:bO 
SUB 900 = PRIhn' #2;")"^ GOTO 638 
525 GOaJB 900 

530 IF A$(5.5)=" " Tf€N 598 
540 PR INT #2 ; " /' , A$( 5.5) = GOTO 638 
590 PRINT #2= GOTO 638 
600 FOR X=l TO 8=U=PEEKCA) 
610 GOSUB 1000= PRINT #2;" "; 
628 A=A+l=hC:>iT X^PRINT #2 
630 IF P=0 THEN \E<T N=G0TO 788 
640 IF PEEK(764)=255 T^£N 348 



March, 1961. Issue lO, 



COMPUTE! 



83 



650 GET #hX .lLD>ri'.0* 

700 POKE 752. 1 ^ PRINT 9230 DATA 

705 PRIhfT "CONTINUE. RESTART. OR STOP (C .2LDXY.0:*: 

/R^S) ?"; 9240 DATA 

710 GET #LXaF X=b7 TF€N 298 DEC.0^ 

730 IF X=82 THEN 290 9250 DATA 

740 IF X083 THEN 710 DEC;0* 

808 PtKE 752.0:CLaSE #1- CLOSE #2 = END 9260 DATA 

900 PRINT #2; "J"; ECX^Ef 

950 U=IhfTCV/256):Q}SUe 1900 9270 DATA 

960 li=Y-<UI256:' X.0* 

1000 H=Ihfr(U/lb;':L=U-(H:^16;' 9280 DATA 

1010 PRINT »2;H*(H+hH+i;';H$(L+LL+l); INC.0:*: 

1020 RETURN 9290 DATA 

9000 DATA 08RK. lORAX >. 8:?;. 0*. 0:^.. lORA. lASL iNC, m 

'®* Sim DATA 

9010 DATA 0PfF;lORH#;8ASL..0:*:.0:*.2ORH.2ftS NCX.0:|;- 

L.Kt *5310 DATA 

9020 DATA 1BPLR.1ORAY>.0:^0S.0:^.1ORhX.1h x.0X 

SLX.0* 

9030 DATA 0CLC.2ORftY.0*.0:J:,0:i;.2ORAX.2ASL 

SmQ DATA 2JSR. 1hM)X>,0$.0.1:.1BIT. lAND.lR 

OL.0:|; 

9050 DATA 0PLP.IAHD#.0ROL,3*.2BIT.2hND.2 

ROL.SI: 

seed DATA lBnIR,l(WDY>.0*.0*.0S.lA^JDX.lR 

OLX 0S 

S87Q DATA 9SEC.2A^DY.a^.0*,0:&■.2ANDX.2ROL 

Xj0S 

9080 DATA 0RTI . lEORX :>M. m> Qt^ 1E0R> ILSR 

9090 DATA 0PHA.1EOR#>0LSR,0:S;.2-J'P.2EOR.2 

LSR.0* 

9100 DATA IBICR. lEORY y,m, m, Q:^^ lEORX. IL 

SRX.a* 

9110 DATA 0ai.2£ORY..0*:,0$.0:4:.2EORX.2LSR 

X.0t 

9120 DATA 0RTS.lAOCX>;0S.0$,0:|c.IADC.lROR 

.0* 

9130 DATA 0PLA.lHDC#.0ROR.0*.2JfF>.2ADC. 

2ROR/0t 40992 

9140 DATA IBl'SR. imCY h &^,dt. 0:^. lADCX; IR 40994 

ORX.0* 40995 

9150 DATA 0SEI.2AOCY.ai;.0;?:;0:|;-..2AOCX.2ROR 40997 

X.0* 40998 

9160 DATA m^ 1STA>=; >. Qt. m, ISTY. ISTA. ISTX 41000 

,m 41002 

9170 DATA 0OEY.0^/0T>iA,0J.2STY.2STA.2STX 41004 

,0:5. 41086 

9180 DATA IBCCR. ISTAY :',m,m.. ISFfX. ISTAX 41089 

.ISTXT.a*: 41011 

9190 DATA 0TYA,2STAY.0TXS,0:f.0:^2STA;>(.9:i; 41013 

^dt 41016 

9200 DATA lUT)'*, ILDAX ). 1LDX#. Qt, ILDY, ILD 41018 

A^ILDX.©:? 41019 

9210 DATA 0TAY. 1LDA#. 0TAX. 9*. 2LD'/. 2LDA, 2 41021 

LDX.0t 41023 

9220 DATA 1 BCSR. 1 LDAY y,m., Qt, 1 LDV:';* . ILDAX 41024 



0aU, 2LDAY. 9TSX, 0*. 2Lm':>^'. 2LDAX 

icpi'#, larKih&ii.Qt. icPY. icnp. i 

0I^fY. lCf-1P#. 9DD<. m, 2CPY. 2CriP, 2 
IBNER. ICTFY ), m, Qt, m, IDIPX, ID 
0CLD. 2C:fFY. &i% Qt,Qt^ ZQTK, 20EC 
1CPX#. lSeCX>.0:Ji'.0*. ICPX. ISBC. 1 

0in:=<, isec#.. onop. 9*-. 2cp;k. 2sec. 2 

IBEQR. 1SBCY>;0$.0:S;0:S. 1SBCX> 11 

0^D. 2sbi:y. m.> m, dt.. 2sbch, 2inc 



LOC-DEC/HE^' 12 3 4 5 6 7 



40992 
41000 
410^ 
41016 
41024 
41032 
41040 
41048 
41056 
41064 
41072 
41080 
41088 
41096 
41104 



A020 
A02S 
A030 
A038 
A040 
A04S 
A950 
A058 
(^60 
A068 

H070 

A873 
A080 
A08S 
A890 



95 00 
98 F6 
A8 A2 
A9 00 
A9 80 
8A A9 
£0 41 
F0 93 
A5 CA 
51 DA 
BA 20 
85 F2 
85 B3 
^ AD 
Oe 20 



E8 94 
A2 86 
8C A0 
AS 31 
91 8A 
0A 85 
W 20 
20 99 
DO 9C 
h9 5D 
F4 AS 
35 9F 
85 B8 
A5 85 
9F Al 



00 ES 
A0 31 
03 £9 

84 31 
CB A9 
C9 20 
72 BD 
BD 20 
A2 FF 

85 C2 
DO Eh 
85 94 

O-J Di 

35 hE 
20 CS 



E0 32 

28 7F 
7F AS 
Sh CS 
03 91 
FS BS 
A5 92 
57 BD 
9A 28 
20 92 
A9 00 
85 f^ 
h5 84 
20 Hi 
A2 h5 



nt SATPLE METIORY DUf1P 



LOC-DEC/f€X OBJECT DISSASSET^'i 



A020 

A022 
A023 
A025 
A826 
Aa28 
A02A 
A02C 
A82E 
A031 
A033 
A035 
A038 
A03A 
A03B 
A03D 
A03F 
A040 



95 00 
E8 

94 00 
E8 

E9 92 
90 F6 
h2 86 
m 01 
20 7F A8 
A2 SC 
A0 03 
28 7F A8 
AS 00 
AS 



84 
8A 



91 
SI 
C8 
A9 80 



STA $00. X 

IKK 

STY $80, X 

IFK 

CP;'^ #$92 

BCC $A020 

LDX #$86 

LDY #$01 

JSR $ft87F 

LD;\' #$8C 

im #$03 

JSR $A87F 

LDA #$09 

TAY 

STA ($84)/Y 

STA <:$8A>.Y 

IW 

LDA #$S0 



84 



COMPUTE! 



March. 1981. Issue 10. 



41026 
41028 
41029 
41031 
41033 
4ia35 
41037 
41040 
41043 
41046 
41048 
4ia50 
41053 
41056 
41058 
41060 
41062 



A042 
A044 
A045 
A047 
A049 
A04B 
A04D 
A050 
A053 
A056 
A058 
A05A 

H0S) 

A060 
A062 
A064 
A066 



91 8A 
C8 

AS 03 
91 8A 
PB 0A 
85 C9 
20 FS B8 
29 41 BD 
28 ?2 BD 
ft5 92 
F0 03 
20 99 BD 



20 57 
A5 CA 
D9 9C 
h2 FF 
9A 



BD 



STA C$8H)/r 
IHY 

LDA #*03 
STA (fSAX.Y 
LDA UQh 
STA $C9 
JSR $B3FS 
.JSR *B041 
JSR SBD72 
LDA $92 
BEQ fH05O 
JSR *e099 
-JSR IBD57 
LDA $Ch 
BNE *h900 
LDX #IFF 
TXS 



tun SAffLE DISSASSEriELr UUt © 

Formatted 
Output for 
ATARI Basic 

Joseph J. Wrobel 

Many folks tell me that they must struggle to pro- 
duce nicely formatted output when using ATARI 
Basic due to the lack of the TAB function and the 
PRINT USING command. Struggle no more. When 
used together, the two subroutines presented in this 
article can provide formatted output simply and 
directly in ATARI Basic. Both numerics and strings 
are supported. The type, arrangement and format of 
variables which appear on one output line are con- 
trolled on a line-by-line basis by the main program. 
The number of variables in one output is limited 
only by the character width of the output device. The 
output device can be the TV screen or any type of 
printer, ATARI or otherwise. 

The approach to formatted output used here 
employs two subroutines. The purpose of the first is to 
construct a hnc for output in a string variable set 
aside for this purpose. Each time the subroutine is 
called, it inserts the data sent to it by the main pro- 
gram at the selected position in the string and in the 
format requested. When all the data to be printed in 
the current line has been positioned, the second 
subroutine is called. This subroutine merely prints 
the output line string on the appropriate device, then 
clears the string (fills it with spaces) to prepare it for 
the next line of data. 

A sample program using the routines is given in 
Listing 1. Line 10 is required to set aside the strings 
to be used in the subroutines. LINES is the string 
which will ultimately contain the formatted output 



line. It is dimensioned to a size one less than the 
character width of the output device. In the example, 
for the 38 character wide default screen size, it is 
dimensioned to hold up to 37 characters by setting 
NC to 37. Line 20 initializes LINES to a siring of 
spaces. N$ is a string used to temporarily store each 
data item. It should be big enough to hold the largest 
of your data items. To be on the safe side, its length 
is set equal to that of LINES. 

The actual subroutines of interest reside in lines 
1000-1070 and lines 2000-2010 respectively. The lat- 
ter routine, as noted above, simply prints LINES 
(line 2000) then fills it with spaces (line 2010) in 
preparation for the next output line. If, instead of the 
screen, a printer is the output device, then the 
PRINT of line 2000 may simply be replaced by an 
LPRINT or a PRINT # command, whichever is ap- 
propriate. 

The routine starting at line 1000 actually does 
the formatting and has two different entry points 
depending on whether the data item is a string or a 
numeric. The case of a string is the simpler of the 
two, so let's consider it first. To position a string you 
must place the string in variable N$, specify the col- 
umn position (RC) against which it is to be right 
justified, then GOSUB 1060. Three examples of this 
calling sequence are given in lines 100-120. At line 
1060 the program first calculates LC, the leftmost 
character position of the data item. Then, if the 
column boundaries are acceptable, it inserts N$ in 
LINES and RETURNs. 

To position a numeric, you must put the data 
item into variable N, specify ND, the number of 
digits to the right of the decimal point you wish 
printed, specify RC as defined above, then GOSUB 
1000. See lines 150-170 for examples of this calling 
sequence. In lines 1000-1010 N is rounded to the ap- 
propriate number of decimals. In 1020 the string N$ 
is defined. If the number is to be printed as an in- 
teger (ND =0), NS is correct as is and the jump is 
taken to 1050 to insert N$ into LINES. For non- 
integer formats, the decimal point and any trailing 
zeroes which were dropped in forming the string 
representation of the number must be restored. This 
is done in lines 1030-1050. NS is then ready for in- 
sertion into LINES. 

Output from the sample program as printed on 
an ATARI 820 printer (using LPRINT in 2010) is 
shown in Figure 1 . Note that the numbers are 
rounded for presentation with the requested preci- 
sion, that the decimal points of each column neatly 
line up, that all trailing zeroes are present and that 
negative numbers are also accommodated. Also note 
how easy it is to line up the column headings with 
the data by simply specifying the appropriate value 
of RC when printing them (see lines 100 & 150, 1 10 
& 160, 120 & 170). ' 

The routines run fairly rapidly, but if you need 
some extra speed, the loop in line 2010 can be 
avoided. To do this, dimension a string, let's call it 



March, 1981. Issue 10. 



COMPUTE! 



65 



MT$, the same length as LINES and fill it with 
spaces just once at the start. Then, line 2010 can be 
replaced by 2010 LINES = MTS:RETURN 
If you have a slow printer like a teletype, you may 
also gain some speed by stripping the trailing spaces 
from LINES before printing it. This can be done by 
replacing line 2000 with the three lines given below, 
2000 FOR I = NC TO 1 STEP -1:IF LINES(I,I)< >" " 

THEN 2004 
2002 NEXT I 
2004 PRINT LINES(1,I) 

1 REM n FORMATTED OUTPUT EmVlE U 

2 REM JOE WROBEL.. ROChESTER, W 

3 REM SUBROUTINE iJARIAEHES - LLC.H..HC.H 
D.N2..RC,LINE$.N$ 

10 NC=3?^Diri LIh€^(H:).NI(NC) 

20 GOSUE 2810 

106 H$="X"^RC=7-G0Sl£ 1066 

110 H$==">v'32"^RC=17 = G0SUB 1068 

120 M$="SIH(PI:«:X/8)":RC=33:G0SUB 1068 

138 GOSUB 200U 

140 FOR X=0 TO 15 

150 N=X:^C>=0^RC=7^GOSLe 1009 

160 H=X/324JD=3 = RC=17:G0SUE 1809 

170 H=SIH< AtmV: 1 )rX/8 ) ■■ ND=7 ■■ RC=32 ■■ G0SU8 

1006 
180 GOSUE 2000 ■■ \-eAl X 
190 STCF 

1080 I=im'(104JO+9.5) 
1910 ^^=IHT(I*N+0.5>/I 
1020 H$=STR*(H)^IF M]=0 THEN I960 
1030 IF N=IHT(H) THEN N$(LEM<:hJ$)+l )=" . " 
1 940 h^2#0+ 1 +LEhJ<: STR$( I HT( H ) ) >-LEH( HI ) 
1050 IF hC>0 THEN fW. 1=1 TO hG ^ hl$( LEN( M 
$)+i;,="0":^OT I 

1060 LC=F.:i>l-LENa4J:-IF LC<=RC AUD RC<=N 
C AM3 LC>=1 THEN LIhEI<LC.RC)=htf 
1070 RETURN 
2009 F-RINT LINE* 

2819 FOR 1=1 TO 1C:LI^€$( LI )=" "^f€XT I 
= RETURt-l 



X 


X/32 


SIN<PI:&i^'S) 




9 


0.099 


. 0090000 




1 


0.031 


0.33268.34 




2 


0.963 


0.7071E168 




3 


0.094 


0,9238795 




4 


0.125 


1 . 0009000 




5 


0.156 


0.9238795 




6 


8.188 


9.7971668 




7 


0.219 


0.3826834 




8 


0.250 


. 0000000 




9 


8.281 


-0.3826834 




19 


0.313 


-0.7071868 




11 


0.344 


-0.9238795 




12 


8.. 375 


-1.909000ei 




13 


0.496 


-0.9238795 




14 


0.4-38 


-0,7071063 




15 


0.469 


-0,3326834 


© 



Random 
Color 
Switching 
Willie idle 



R. A. Howell 

Have you ever been involved in a scenario similar to 
the following? This has happened to me several 
times. I get the program listing of a new game 
from a friend or from the pages of a magazine. The 
game sounds really exciting, so I anxiously begin 
typing the program into my Atari 800 computer 
system. Of course, my 10 year old son is busily 
watching over my shoulder because he is also anx- 
ious to try out the new program. When I finally 
finish, we try it. After a few corrections for typing 
mistakes, the game is running and we get deeply 
engrossed in playing it. About the time we have 
mastered the rules and are into the full action and 
excitement of the game, ZAP!!, the Atari 800 goes 
into its random color switching routine on the screen. 
This usually makes the playing field difficult to see 
because the random colors selected by the computer 
are either too dark or are all of similar shades so they 
blend together. The solution is simple for those of us 
who have used the Atari; just hit a key, any key on 
the keyboard and the original program's colors will 
be restored. Right! Wrong! The problem with this is 
that if I take either hand from the joystick or fire 
button to hit a key, my son gains the advantage in 
the game and vice versa. Have you also found 
yourself in this dilemma? 

The problem occurs because of a hardware 
feature on the Atari computer. When a key has not 
been pressed for a little over 9 minutes, the system 
automatically starts to vary the colors on the screen. 
It will continue to randomly vary the colors on the 
screen until a key on the keyboard is pressed. At that 
point it will return the screen to the correct colors 
and begin the 9 minute time-out sequence again. 
The purpose of this feature is to prevent the image 
on the screen from being permanently burned into 
the phosphor on the cathode ray tube when the com- 
puter is left for a long time without being changed. 
However, many programs (games in particular) do 
not require any key-presses. All inputs come from 
trigger buttons and game paddles or joysticks. When 
running such a program, it is inconvenient to have 
this color switching occur every 9 minutes, so let's 
look at what triggers this feature and how to prevent 
it from happening. 



86 



COMPUTEf 



March, 1981. Issue 10 



Type the following one line program into your 
Atari computer and run it: 
10 PRINT PEEK(77): GOTO 10 

This program repeatedly displays the contents of 
RAM (Random Access Metnory) location 77 on the 
screen. As you can see by watching it run, RAM 
location 77 starts at and increments by 1 every 4 to 
4.5 seconds. Now while this program is still running, 
press any key on the keyboard (except BREAK or 
the 4 special function keys). As soon as you pressed 
the key, notice that location 77 returned to and 
started incrementing all over again. Now let the pro- 
gram run for a while without pressing any keys. 
After approximately 9 minutes, the count will be 
close to 128. As soon as RAM location 77 reaches 
128, you will see that it gets set to 254 and the screen 
colors immediately begin to vary randomly. Now 
with the program still running, press any key again. 
Normal colors are returned to the screen and location 
77 begins all over incrementing from 0. 

Each byte of memory in the Atari consists of 8 
BITS (Binary digiTS - I's or O's). The lower 7 bits 
of memory location 77 are used to count from to 
127. When the count reaches 127, all of these 7 bits 
are binary I's. Adding 1 more causes the 8th (upper- 
most) bit to change from to I and this triggers the 
random color switching hardware. At 4 to 4.5 
seconds per increment, it takes about 9 minutes for 
the computer to count from to 127. Any number in 
location 77 from 128 to 255 will cause the upper bit 
to be set to 1 and the random color switching to oc- 
cur. To see this, stop the program from running 
(with the BREAK key) and enter the following: 
POKE 77,217 

When you type this and press RETURN, the 
screen immediately starts switching colors because 
217 is between 128 and 255 and has caused the up- 
per bit of memory location 77 to be set to 1. 

So any BASIC program can be modified to pre- 
vent the random color switching from occurring by 
periodically executing a POKE 77,0 to reset location 
77 to zero and prevent it from reaching 128. Now 
you say, 'Won't this stop the computer from doing 
its color switching if I leave it for over 9 minutes 
with that program running and thus defeat the pur- 
pose of this hardware feature?' The answer is no, not 
if the POKE statement is placed in the program pro- 
perly. When the program is idle, it will probably be 
in a loop waiting for paddle or joystick inputs. Just 
make sure the POKE statement is not put in this 
loop. Place it elsewhere in the program where it will 
be executed frequently. Then, if the computer is left 
idle while the program is running, it will not execute 
the POKE statement and random color switching 
will take place after 9 minutes. When the player 
returns, as soon as the joystick or paddle is moved or 
a trigger button pressed, the idle loop will be ter- 
minated and the POKE statement executed, return- 
ing the screen to normal colors. If the POKE state- 



ment is put in the right place, it can be made to ap- 
pear as if the paddle or joystick acted just like a key- 
press in restoring the screen to normal. 

Now that the function of RAM location 77 has 
been revealed, the random color switching feature of 
the Atari computer can be put back into its proper 
place. It won't need to be a bother any longer by 
popping up unexpectedly at the wrong moment! 
Happy programming. € 



ATARI 

software 

* 

*LASERBALL* 

GAMEOFZAP-OR-BE-ZAPPED! REQ. 8K, 

2 JOYSTICKS. CASSETTE ONLY $5.95!! 

(AZ ADD 5%) SEND CASH, CHECK OR 

MONEY ORDER TO: 

COMPUGRAPHICS 

13850 N. 19th AVENUE. SUITE #220 
PHOENIX. AZ 85023 (602) 863-1047 



Software for 
Personal Computers 



A CollecTiOn of 10 choHergirg progromi Created tO provide O unique 
enter lalrimeril volue — ord 2 perioral bulincM progroms v^ith brood 
funcfional value. In disk ar.d or dasicfle as irdicoted. 



GAMES • HELICOPTER BATTLE 

• MORSE RACING 

• XENO 

• LIGHTNING EOITS 
ond REACTION 

• THE MAD MAfiSLE 

• MUSiGAME [SGamui) 

• 5UPERMA5TEB 

• TAG 

• TRACTOR BEAM 

• WAR AT SEA 

BUSINESS • CCA Dolt, 

Morogemenl System 

• LETTES WRITER 

Mastetco 



Req 
Rcq 
Req 
Rpq 
Req 
Req. 
Req 
Req 
Req 
Req 



Req 
Req 



. 16K RAM 

I6K RAM 

. I6K RAM 

■ 16IC RAM' 

- 8K RAM 
. 16K RAM 
. 16K RAM 
-liK RAM 

- EK RAM 

■ !4K RAM 
. 16K RAM 
-2JK RAM 

- BK RAM 

- IfiK RAM 

- 16K BAM 
. 16IC RAM 
. 8K RAM 
-16K RAM' 

- UK RAM 
-24K RAM 



Cossette 

□ Isk 

Coisettc 

Disk 

Cassctfe 

Disk 

Cassette 

DItk 

Cassette 

Disk 

Cassette 

Disk 

Cassette 

Disk 

Cossette 

Disk 

Cassette 

Disk 

Cassette 

Disk 



-J8IC RAM Disk 
-2JK RAM Disk 



S 9.95 
14.95 

9.95 
1J.9J 

9,95 
14.95 

993 
14.95 

9.93 
14.95 

9.93 
14.95 

9.95 
14.93 

9.95 
14.95 

9.93 
14.93 
14.93 
19.95 

99.95 
19.95 



'd i VISA Accepted 




DtVISIOM OF CUSTOM ELECTRONICS. INC. 

s SOFT\A/ARE. 



2ns Exchonge St., Chicopee, Mosiachusetts 01013 

(413) 592,4761 

• Deoler And Distilbulor Inquiries Invited 

C[oied Mandoyi— Open Doily Til 5:30 — fridays 'Til ! 



March. 1981. Issue lO, 



COMPUTE! 



87 




A Small 
Operating 
System: 
OS65D 
The Kernel 

Part 3 of 3 

Tom R, Berger 
School of Moth 
University of Minnesota 
Minneapolis, MN 

Concluding 
Remarks 



OS65D is a very small operating .sysicrn. Il is in no 
sciist' 'generalized' to run with a large variety of soft- 
ware or peripherals as, say, Digital Research's CP/M 
is for the Z80. II' software and peripherals other than 
those supplied by OSI are to be used, then the 
operating system must be modified. There are ad- 
vantages and disadvantages to such an operating 
system. Disadvantages result from its inherent inflex- 
ibility and lack of generalized commands. On the 
other hand, because the operating system is so very 
small and easy to understand, for those who choose 
to understand it, it is easy to modify to suit personal 
needs: a definite advantage. 

Let's look now at some 'features' not available 
in OS65D. Essentially all the operating system is in 
memory at all times. This creates minor problems 
with peripherals and INPUT/OUTPUT. For exam- 
ple, the original conception by OSI of I/O leads to a 
sequence of routines exactly filling the I/O space. 



Time has shown that OSI did not make the perfect 
choice for all situations. In particular, the real time 
version of 0565 D requires that certain of the I/O 
routines be partially overlaid or omitted to make 
room for expansions of other I/O routines. The miss- 
ing routines are not easily returned except by special 
allocation. A more generalized system would have an 
area of memory for I/O routines (just as OS65D 
does), but this area would not have fixed routines in 
it. I/O routines would be written to run at any loca- 
tion and would be loaded into the special space from 
the disk when they were needed, and where a niche 
was available. After they had served their purpose, 
the space they occupy would become available for 
other routines. This 'generalized' approach eases I/O 
problems, but requires much additional coding to 
handle all the loading and space allocation. 

The disk handling routines could not be made 
much more compact. In particular, many user func- 
tions are left out. Thus the user must do a large 
amount of housekeeping not required on larger 
systems. The most glaring deficiency is the file crea- 
tion process. You cannot create a file until you know 
its size. Usually, you cannot know its size until it 
is in memory; but the file creation utility occupies 
the .same space as the file. As a result, a scratch file 
must be created in order to temporarily save pro- 
grams while a permanent file of the correct size is 
created. The process becomes even more involved if 
you wish to expand a current file beyond its current 
size. 

If you use BASIC programs which process many 
files, then the error recovery process of OS65D is far 
too simple. li BASIC calls an operating system com- 
mand (say DISK! "blah blah") and an error occurs, 
this error is often nonrecoverable. That is, the stack 
is reset and return to BASIC occurs through the 
WARM START. This often means your program 
will bomb if you try to CONTINUE. If you have a 
large amount of information stored in BASIC strings 
and in the process of saving it encounter a disk error, 
then without a great deal of knowledge about the in- 
ternal working of BASIC, your information is lost. 

Most file handling is done with BASIC utilities. 
If you are programming in assembly language, this 
leads to endless shuffling back and forth from BASIC 
to the Assembler and back. 

The operating system lacks an adequate editor. 
Thus the Assembler and BASIC must contain their 
own editors. As a consequence, all input must be ac- 
ceptable to one of these two editors if it is to be pro- 
cessed. In particular, line numbers are needed. A 



88 



COMPUTEI 



March. 1981. Issue lO. 



BASIC program can be created to solve this num- 
bering problem, but BASIC may be too slow. Solv- 
ing this new problem leads to further complications 
which would not be necessary with a good operating 
system editor. 

There are certain philosophical advantages to a 
small operating system. OS65D is small enough that 
its entire operation can be understood at once. This 
means hackers can modify and alter the system, not 
just by POKES and patches, but fundamentally, to 
suit their own needs. In my experience, most hobby 
OSI computer owners aspire to or already fall in this 
hacking category. The smallness of the system puts 
the user in direct contact with the most fundamental 
operating system commands and operations. Even 
though it is slightly more involved, this gives the user 
the very maximum of control over the system. 

This article was written using disassemblies of 
OS65D V3.2 (NMHZ) Release November 1979. 
Future articles will cover: (1) the I/O routines; (2) 
the Disk routines; (3) the ROM, and (4) 
miscellaneous bits and pieces. The disassemblies I 
have made are fully annotated (by hand) and are 
available for those who would like to use them. Send 
a stamped, self-addressed postcard to me to deter- 
mine a\'ailability. 

Tom Berger 

10670 Hollywood Blvd. 

Coon Rapids, MN 55433 © 



^ SOFTWARE FOR OSI 

•^ VIDEO GAMES 1 S1S. 

jw Three Games, Head-On is like the popular arcade game. Tank 

"T* Battle is a tank game for two to four. Trap! is an enhanced 

>j blockade style game. 

K, VIDEO GAMES 2 S15. 

>* Three games. Gremlin Hunt is an arcade-stylegameforoneto 

jy three. G untight is a duel of mobile artillery. Indy isa race game 

"T^ for one or two. 

>5 ADVENTURE: MAROONED IN SPACE S12. 

jy An adventure that runs in 8K! Save your ship and yourself from 
1* destruction. 

■^ DUNGEON CHASE S10. 

jw A real-time video game where you explore a twenty level 
v^ dungeon. 

M BOARD GAMES 1 S15. 

j« Two games. Mini-gomoku is a machine language version of 

r^ five stones gomoku. Cubic is a 3-D tic-lac-toe game. Both with 

>j graphics. 

>f DISASSEMBLER S12. 

''^ Use this to look at the ROMs in your machine to see what 

<^ makes BASIC tick. Reconstruct the assembler source code of 

machine language programs to understand how they work. 

■^ Our disassembler outputs unique suffixes which identify the 

. addressing mode being used, no other program has this! 

[] SUPER! BIORHYTHMS S15. 

■^ A sophisticated biorhythm program with many unique 
. features. 

W C1 SHORTHAND S12. 

^ Use only two keystoenterany one of the BASIC commands 
^ #• Ji or keywords. Saves much typing when entering 
programs. Written in machine language. 

For ;ill [^ASIC-in-nOM 5ystET15 SelecTed p/ogramt available 
on (li^h Colo' ar.c; sfiijnd on viOi-'O gamfS 

Send for FREE catalog 

Y^r\ D I C\ M SOFTWARE ASSO. 

r-^V^ 11 I W I" 147 Main St. Ossining, NY 10562 



A Six-Gun 
Shootout 
Game 
For The 
OSI C1P 

Charles L. Stanford 

The Six Gun Shootout game is a very pleasant and 
fun activity, particularly for the six to twelve or so 
age group. But this article concerns more than just 
the mechanics of writing another BASIC game for 
the CIP. When I originally wrote the program 
almost two years ago, we were reasonably satisfied 
with it. Sure, it was slow. Every time a player moved 
his gunfighter up or down the screen, the graphics 
POKEs took a lot longer than desired. And 
remembering that the "1" key was UP and the "2" 
key was down took a lot away. Those of you who 
have seen my articles on Fast Graphics (COMPUTE 
II Issue 3) and on interfacing the Atari Joy.stick to 
the CIP {COMPUTE Issue 7) can grasp what hap- 
pened. Making that program work like it should has 
taught us more about the workings of the machine, 
o\cr the past year, than any dozen manuals or ar- 
ticles. 

This article, then, is a summing up of the 
methods we used to speed up both the software and 
the hardware to make BASIC games both more fun 
and much more saleable in the not inconsiderable 
Software marketplace. 

BASIC Program Description 

The game runs much as the early Arcade versions 
did. Each player has his gunfighter, who can shoot 
across the screen. Three Cacti obstruct some of the 
view, and move to a new location after each shot. 
Each player can move up or down, and shoot. Each 
gets 15 shots, and 5 hits wins. 

The BASIC program shown in Listing 1 is fairly 
well annotated with REMs, but a lew of the routines 
bear some discussion. The initialization starting at 
Line 5 sets the screen up as though no joysticks were 
available. This was deliberate, and makes the game 
more universally useful. It is a good idea to do this 
on all games, whether for paddles or for joysticks. 
The scoring from Line 200 is handled indirectly 
through the Fast Graphics Machine Language 
subroutine. Thus the POKEs of the ASCII 
characters are to that program rather than to the 



SOFTWARE FOR OSI 




A JOURNAL FOR OSI USERS!! 

The Aardvark Journal is a bimonthly tutorial for OSI 
users. It features programs customized for OSI and 
has run articles like these: 

1) Using String Variables. 

2) Highspeed Basic On An OSI. 

3) Hooking a Cheap Printer To An OSI. 

4) An OSI Disk Primer. 

5) A Word Processor For Disk Or Tape Machines. 

6) Moving The Disk Directory Off Track 12. 

Four back issues already available! 
S9.00 per year (6 issues) 



ADVENTURES 

Adventures are interactive fantasies where you give the 

computer plain English commands (i.e. take the sword, 

look at the control panel.) as you explore alien cities, 

space ships, ancient pyramids and sunken subs. Average 

playing time is 30 to 40 hours in several sessions. 

There is literally nothing else like them - except 

being there yourself. We have six adventures available. 

ESCAPE FROM MARS - Explore an ancient 

Martian city while you prepare for your escape. 

NUCLEAR SUBMARINE - Fast moving 

excitement at the bottom of the sea, 

PYRAMID - Our most advanced and most 

challenging adventure. Takes place in our 

own special ancient pyramid, 

VAMPIRE CASTLE - A day in old Drac's 

castle. But it's getting dark outside. 

DEATH SHIP - It's a cruise ship - but it ain't 

the Love Boat and sun/ival is far from certain. 

TREK ADVENTURE - Takes place on a 

familiar starship. Almost as 

good as being there. 

$14.95 each 



NEW SUPPORT ROMS FOR BASIC 
IN ROM MACHINES 

CIS - for the C1P only, this ROM adds full 
screen edit functions (insert, delete, change 
characters in a basic line.). Software selectable 
scroll uvindouvs, two instant screen clears (scroll 
window only and full screen.), software choice of 
OSI or standard keyboard format, Bell support, 
600 Baud cassette support, and a few other 
features. It plugs in in place of the OSI ROM. 
NOTE: this ROIVl also supports video conversions 
for 24, 32, 48, or 64 characters per line. All that 
and it sells for a measly $39.95. 
C1E/C2E for C1/C2/C4/C8 Basic in ROM ma- 
chines. 

This ROM adds full screen editing, software 
selectable scroll windows, keyboard correction 
(software selectable), and contains an extended 
machine code monitor. It has breakpoint utilities, 
machine code load and save, block memory move 
and hex dump utilities. A must for the machine 
code programmer replaces OSI support ROM. 
Specify system $59.95 



DISK UTILITIES 

SUPER COPY - Single Disk Copier 
This copy program makes multiple copies, 
copies track zero, and copies all the tracks 
that your memory can hold at one time — 
up to 12 tracks at a pass. It's almost as fast 
as dual disk copying. - S15.95 
MAXIPROSS (WORD PROCESSORl - 65D 
polled keyboard only - has global and line edit, 
right and left margin justification, imbedded 
margin commands, choice of single, double or 
triple spacing, file access capabilities and all the 
features of a major word processor - and it's 
onlyS39.95. 



P.C. BOARDS 



MEMORY BOARDS]] - for the CIP. - and they 
contain parallel ports! 

Aardvarks new memory board supports 8K 
of 2114's and has provision for a PIA to give a 
parallel ports! It sells as a bare board for S29.95. 
When assembled, the board plugs into the expan- 
sion connector on the 600 board. Available nowl 

PROM BURNER FOR THE CIP - Burns single 
supply 2716'5. Bare board - S24.95. 
MOTHER BOARD - Expand your expansion 
connector from one to five connectors or use it 
to adapt our CIP boards to your C4/8P. - $14.95. 



ARCADE AND VIDEO GAMES 

ALIEN INVADERS with machine code moves - 
for fast action. This is our best invaders yet. The 
disk version is so fast that we had to add select- 
able speeds to make it playable. 
Tape -510.95- Disk -S12.95 

TIME TREK (8K) - real time Startrek action. 
See your torpedoes move across the screen! Real 
graphics — no more scrolling displays. S9.95 

STAR FIGHTER - a real time space war where 
you face cruisers, battleships and fighters using a 
variety of weapons. Your screen contains work- 
ing instrumentation and a real time display of the 
alien ships. $6.95 in black and white ■ S7.95 in 
color and sound. 

MINOS - A game with amazing 3D graphics. 
You see a maze from the top, the screen blanks, 
and then you are in the maze at ground level, 
finding your way through on foot. Realistic 
enough to cause claustrophobia. — S12.95 



SCREEN EDITORS 



These programs all allow the editing of basic 
lines. All assume that you are using the standard 
OSi video display and polled keyboard. 
CIP CURSOR CONTROL - A program that uses 
no RAM normally available to the system. (We 
hid it in unused space on page 2). It provides 
real backspace, insert, delete and replace func- 
tions and an optional instant screen clear. 
$11.95 

C2/4 CURSOR. This one uses 366 BYTES of 
RAM to provide a full screen editor. Edit and 
change lines on any part of the screen. (Basic in 
ROM systems only.) 

FOR DISK SYSTEMS - {65D, polled key- 
board and standard video only. J 
SUPERDISK. Contains a basic text editor with 
functions similar to the above programs and also 
contains a renumberer, variable table maker, 
search and new BEX EC programs. The 8EXEC* 
provides a directory, create, delete, and change 
utilities on one track and is worth having by 
itself. - S24.95 on 5" disk - $26.95 on 8". 



AARDVARK IS NOW AN OSI DEALER! 

Now you can buy from people who can support 
your machine. 

-THIS MONTH'S SPECIALS- 
Superboord II $279 

CIP Model II 429 

C4P 749 

. . . and we'll include a free Text Editor Tape 
with each machine! 

Video Modification Plans and P.C. Boards 
for CIP as low as $4.95 




This is only a partial listing of what we have to offer. We now offer over 100 programs, data sheets, ROMS, and boards 
for OSI systems. OurSI.OO catalog lists it all and contains free program listings and programming hints to boot. 

Aardvark Technical Services • 1690 Bolton • Walled Lake, Ml 48088 

(313)669-3110 




<?o 



COMPUTI! 



Morch, 1981. Issue 10. 



screen. One routine, the "man dead" sequence, is 
still done in BASIC POKEs as a delay is called for 
here anyway. 

The Joystick Interface 

As described in the previous article mentioned above, 
the joysticks are interfaced lo the keyboard such that 
any position can be directly related to the pressing of 
one or two keys. While the Atari Joysticks have eight 
positions around the center, only two of them are 
used in this game, and the others arc "masked" out 
of existancc. This is done with the routines beginning 
at Lines 700 and 750. Line 710's POKE K, 127 ac- 
tivates only Row 7 of the Keyboard. The first state- 
ment of Line 720 ORs away any columns except 5, 

4, and 3, by forcing Is into the others. Thus only 
keys 3, 4, and 5 are accepted as valid inputs. The 
next two statements of that line mask all but Column 

5, so that a "shoot" command gets precedence over 
a "move" command. Finally, the other two keys are 
examined in Lines 725 and 730, and one of the move 
routines is addressed. 

The routine at 750 works the same, except that 
Row 6 is activated, and the other player gets his 
chance. Each player is queried in turn, so one guy 
can't stand there and fill the other full of holes. The 
joystick works tlie same way as the keyboard, and is 
certainly a lot easier to use without a lot of practice, 
especially by the younger players. 

Fast Graphics for the Six Gunners 

The machine language graphics is done exactly the 
same way as the Choo Ghoo Collision demonstration 
program of the other previous article. A standard 
routine, shown in Listing 2, addresses a table of 
graphics symbols. These symbols are tailored for any 
game or other graphics screen display as shown in 
Figure 1. First, the Graphics Reference Manual is 
used to "draw" the characters desired, using a grid 
of sufficient size. Don't worry about screen location. 
The BASIC program takes care of that, by POKEiiig 
the table. Just lay out the characters, Determine the 
addresses of each of the elements of each character 
relative to the upper left corner of its grid, and 
couple that with the character code in making up the 
table. Each character should be ended with an #$FE 
(if there are more characters) or an #$FF (for the last 
character, or to end the routine). 

Going Farther 

You can just enter this program as-is, and have 
another nice game for your collection. Or you can 
dig a lot deeper, and quite possibly learn some 
techniques that will improve both your programming 
ability and some of those other games that run a bit 
slow, or get tiresome because the keyboard .sequence 
is hard to use and remember. Anyone wishing lo 
gain a deeper understanding of cither the hardware 
or the software concepts described here should most 
certainly look to the other articles referenced. 






m 






?0 


f?l 


0? 








?? 






7I 








(?1 


(>? 


^^ 




f^l 








Al 


t\? 




■1. 


CI 


C2 


C^ 







?f? 




?1 


?? 




h 





3^ 


ee 


?0 






Al 


AE 






9^^ 








BB 


«^ 


Bit 




f3f5 








V 


R^ 




^ 


0^ 


8f 


CF 



?A 




BQ 


?A 


BR 


R° 




21 





Figure 1. Graphics Development 



Li.'iting 1. Basic Program 

5 rORS.p(TO?:PHtM:fJEXT 

7 BEM-FOB AT4RI jrSTKS 

10 PRINT" r.lK-GUN DUEL GA.>1E 

15 PR I NT : PR I NT: PR mr 

20 PRINT"lEFT", "RIGHT" 

25 PRINT" "," 

30 PRINT" 1) UP"," : 

35 PRINTrPPINT" 3 DCWN" " 

60 PRINTrPIINT" 5 SHOOT*," 

1*5 PRINT:PR|HT:PRINT"y!ju Mjyc I5 shots CiCii, 

50 PRINT:PRIriT:PRINT"F i«c bits uinsI 

55 PRINT:PHIHT:PRINT"Hii sPACtoAB to iiakt 

60 GOSUBI0P 

65 gosubS*' 

70 2=1 ;L=0:R=0:SL=15:SR.15 

75 POK£53tf. t:K=570C<i:C=53lHl5:D=5U005 

00 POKEK,E';3:IFPEEK(K)»23aTHLN90 

85 GOTOfi0 

50 X-USR(x' :GOSUBa00 

95 GOTO700 

10^ REM-WCH GRAPHICS 

110 RESTORE 

115 POKE 1 1,314 :POKE12,2;POKE?5l4,96:POKE255,g 

120 FCRP^0TO6l :R£ADM:P0-<E516+P,M:NEXT 

133 DATA16,'!,0, 1C9,'~ "■- •' ^" •" " - 

n5 DATA? "■ " " " - 

l50 DATA177,25U,ll<1,«7,2,2K, 177,251;, 170, 2j;0,S2U,?EU,?^^,?36,2?U, 255 

11)5 DATApltC, 3, 177, 2511, g?0, 157, 63, 22^,208,236, 96, 2311, Pit, 2311, 2311, 23!i 

ll|8 REM-Fir.URES NtXT ' " 

t"!? PCKE133,255:POKEt3'l,31 :FCRP=t5T0152:READ.*<: PaKE608*P, M:NEXTP 

150 D4TA|Q:,2eS,0, 123,1, ia7, 2, 128, 33, 161, 314, 171*, 65, 1119,97,1 37 
155 DATA93.l3l,9Ci,lH0,l29,l87, 161,136,162,110, 192. 5, 113, 136, 19U,1>)3 
160 DATAiQ^,8,25ii,l7?.2?S,0,ie6,2.i65, 32,186, ^3,iSS,3li,i8-=,, 05 
165 DA TAiVi, 2511,1711,2^*9,0,166,3, t05,3?,T86,3-i;iSli,3ii;i?5,E5,iliQ 
170 OATA25ii,l7H, 21(^.0,166.2,165, 32, 166, 33, i8ii,3it, iS5,6s,ii4q 2514 



K=W'UQ1 :klaum:ho^L54D+p,m:nlxt 

Ai6,'!,0, 169,32, t53.(J, 21 ',153^^.215?, '53.^.209,153.^ 

A20b, 20!J, 2CS, 2itl, 23^,2311, 23^,16^.0. 177, 25^,1 "tr.Se, 2, 200 
*'77,25U,ll<1,e7,2,2t'0, 1 77.2511,170, 200, SSI,?': "4. ?!40,?36,2?U, 255 



914,1143 



ATA93.i3i,99.lH0,i29,ia7, 161,136,162,110, 192.5,113,136,1 
*TAiQ^,8, 256, 170,208,0,166, 2. 165, 32, 186, ^3, iSS,3ii,i8-=,, 05 
ATAiliri,25it,l7i4,2if9 0, i66,a, t05,3?,r86,3-i;iSli,3ii;i?5,E5,i 

,lf, ljA TA25ll,17H, 210,0, 1 86.2,1 65, 32, 166, 33, 1811,311, 1S5, 6s, 1149 2^ 
»J5 DATA2Un,2i0, 1,128, 2, 137,3,128, 33, 173, 3)4 161, 66,1 i4a;96, 181 
160 0ATAq7, 131,98,187, 130, 187,161.169, 162, 1113, 192, 5, 103, 136, 19 
185 0ATAI9'>, 8, 2514, 136, 211, 0,149, 1,53, 14,148,10,146, 13, 149, ill 
190 OATA53, 255,255,255,0.0,^,0,0,0,0,0,0, 0,0,0 

195 oatabCi. 2. 3. ''.5, 6,7. 0.9, If," 1, 12, 13, 114,15 

199 RETURN 

200 REM-SCOBE 

210 PCKE730.1l8tL:PCKE732,l48+R 

220 IFL=5ORR=5THEN290 

230 M»INT(SL/I2!> :N.S[.-r^»10:lFM.0TH£4*(— t6 

2li0 U-INT(jR/10):V=.SR-U-10:lFU.0THENU.-1t. 

250 P0KE726,l|5fM:POKE728,llBtN 

260 PQKE73!4,l4a4-U:PCK£736,ll84-V 

270 lfSL=0ANDSR»0TH£N290 

230 RETURN 

290 X.USR(X) :GDTOfi0 

300 REM-LEfT MAN DEAD 

305 C-C+160 , , , 

310 PCKEC+2,32:PCKEC-31,'42:POKFC-6t,32:POKEC-62,32:POKEC-63,32 

315 PaKEC-95,32:POKEC-12D,32:PDKEC-127,32rPOKLC-15e,32:POKEC-159,32 

320 POKEC-lb0,32 

325 POKEC, 1 143 : POKEC+1 , 1 71 :P0k£C+3, ll40 

330 POKEC+12. 187:PCKEC+^3, 161 ;P0KEC+3ll, lllS 

335 POKEC+i5,l67:°OKEC+3b,lS7:POKEC-.-37,l28 

5I10 POKEC-t58,17rj:PCKEC-t6l4,ll43 

3I45 FORT=0TC500;N[XT:C = C-l60;RETURN 

350 REM-RIGHT HAN DEAD 

355 D=Dt15!r 

360 PaKED+-,32:PCKE:D+l4,32:POKEO-26,32;POKED-60,32:POKED-6l,32 

365 P0KED-£2,32:POKED-92,32T°CKED-)2l4,32:P0KED.125,32 



March, 1981. Issue lO- 



COMPUTE! 



91 



POKED-l j5,'^2:POKED-15&,32:POKED-157,3? 

POKEO+T,139:POKi:D+5, IJl ;POKED+6,136 

PCKED+^S.lTStOOKED*^?, 1 ?3:POKED+3li, I S7:POKED+35, 107 

POKf.D+56,lllS;POKED+37, I6l :POK£D+38, I 87 

POKED+7i5, 1 16 

FORT=C(T05c;3 : NEXT : D=D- 1 58 : RETURN 

IFSL.0GOTO750 

Q'0 

FORX=1T03 

IFC<C();)-32AWC>e(x)-IE8THENQ.3;GOT0i)!l5 

NEXT 

IFC<D-°60RC>D+3?THENG=33:GOTO'J'I5 

■ G.23:GCSUB'l6fl 
GOSUS353 
L-L+l ;GOTOll50 
GOSUSWiJ 
SL-SL-I 

GOSUBS20:GOSUB200 ; <SOJo690 
FORX.C+1^0TOC+t0el+G 
P0K£X,1|5 

NEXT 

FORT»0TO2Sfa:N£XT 

RETURN 

IFSR=tfeOTO700 

0=1 

■ FORX.IT03 
(FD<E(X)ANDD>E(x)-96THENG.Z:GOT05lt5 
NEXT 

lFIXC-6'tORD->C+6>)THENG.23:QOTD5ll5 
G-23:GO3UB560 

GOS,UB'MS0 

■ R.H+ I :OOTO550 
GOStJB56iJ 

GOSUHSsJri: GOSUE?06( : GOTo6lt^ 
; FORX-D+gilTOD+gll-GSTEP-l 

P0KE>;,i*5 

: NEXT 

; FORT=0TO200;NEXT 

( RETU>^N 

( REm-lEFTMOVE 

f C-tf:lFC<53lill3THEN75(i 

I C-C-32:GOTO6'10 

( O.f(:lfC>5l4019THEN750 

; c.c+32 

f H=C:GCSU350^:POKE6^, J:POKE60S,M:X-USR(x) : IFO-1THEN700 

i GOTO7'50 

( REM-RIGHTMOVE 

( 0=1 rlFD<53l4l|3THEN700 

( D-D-32:GOTC690 

f 0"! :IFD>5lt01qTHEN700 

; D-0+3? 

f H-D^GOSUB'^ri0:POKE589, J:P0KE68S, M:X=USH(X) 
i IFQ=0TH£N7'i0 

f rek(-left input 

f P0KEK,127 

; Yl-PEEK(K) 

f T1 = YlORl9Q:TJ=Y10Ral(7; I FYe=2U7THENU00 

, IFY1=239THEK'6(ja 

( IFrl=223TH£N630 

; GoTo75(J 

( RCM.RIGHT INPUT 
( POKEK, 1Q1 

; 2upeek'(k) 

'0 Z1=ZlOR19';:Z2=ZIOR21l7:IFZS=2ll7THEN500 

i IFZ1-23oTH£n6s0 

( lF21-2g3THEfj6S0 

i GOTO700 

( REM-CACTUS UOCATOfi 

( EE»=^3UiU 

! FORX.ITO3 

I E(X).EE+32.|NT(2S-RNO(1)) 

( E(X)=E(X)+X»1( 

f H.E{X) ;GCSL'B90a 

( ONxGosuB870,8oa,690 

; tvEXTX:RETUKN 

f P0K£61|lt, J:POKE61i3,M 

i RETURN 

( POKC6'i9,jtPOK£658,M 

; RETURN 

I poke67U,j:foke673,h 

; RETURN 

( REM-CH'R LCC iUB 

f >I-INT(H/J56) 

( M=-H-J«256 

( RETURN 

f END 



/PSF 

zi?3? 
0?33 
(»?3= 

ffi3^' 

0?34 

0a3c 
e»3f 

0?J0 

0?^l<g 

0?'4A 
{;?l4C 
0?!4l 



'-0 i'f 

A'3 2? 

9= 00 

no 00 

9° 00 

9= 00 
C" 

D0 Fl 
LA 
EA 
EA 

A0 00 

el rH 

pd 56 
cS 

51 FE 

b'} FE 
AA 
C" 

E0 Fl 

r EC 

E0 FF 



l:.y,i 

LDA, I 
D? STA.A.Y 
05 STA.A.Y 
01 STA.A.Y 
QtS STA,A,Y 

IW 

avE 
nop 
n:p 

NCP 

LDY, I 

LDA, (1) ,Y 
0? STA,* 

IWY 

LOA,(l),Y 
0? STA,/. 

I NY 

LDA, (1) ,Y 

TAX 

IfJY 

CPX, ) 

BEG 

CPX.I 



rf?50 F0 0' BEO 

f.232 SI FE LDA, fl),Y 

0?5!4 C6 IW 

0255 ao '5'^ D'^ STA.A.X 

025? C0 EC BN'L 

025A 60 PTS 

Listing 2, Machine Language Subroutine 



0260 
02IS2 

ni 

0268 
026a 
026c 
026E 
0270 
0272 
027S 
0276 
027° 
027A 
027C 
027t 
02^0 
0282 

02"5 
02P7 

023q 

?2eB 
02°D 
02Sf 
0291 
0292 
029IJ 
0296 
0298 
029' 
029C 
02t)E 
02A0 



CS 


n0 


00 


'0 


01 


go 
?0 


02 


21 


AT 


2? 


AF 


l;l 


Q^i 


h< 


1 


(,T 


(■>3 


Bi 

Al 


83 


A? 


Hr 


a 

ri 


^ 


(■? 


Hf 


r.3 


0B 


H 




■4i 


ni 


00 


F>A 


0? 


a- 


20 BA 


21 


B^ 


22 


89 


1)1 


95 


rt 




?£ 


n? 


% 


BA 


20 9A 


2l 


B-J 


27 


F)^ 


1)1 


95 


ft 





•'^Al 
0?AT 
02 A"; 
02..i 
02 i 9 
02AB 
02AD 
02AF 
02B0 
02B2 
02B1i 
028*^ 
0?DS 
02BA 
02BC 
0?BE 
02C0 
02C2 
02C" 
02C6 
02:" 
02CA 
0?CC 
02CE 
02 D0 
0?D? 
0?D' 
0?D'l 
0?DT 
020" 

0?Da 

0200 
02 Df 
0?£1 



1? D1 

00 BA 
0? B^ 

20 BA 

21 bS 
?? B9 
1)1 95 
FC 

F-) D2 

01 80 
0? ES 
01 80 
21 AD 
2? Al 
■ii? 95 

60 B5 

61 63 

6? BB 
"2 B3 
Al BO 
A2 "F 
C0 05 

CI 33 
c? Sf 
c^ 03 

FE 

00 f\ 

01 1=^ 

01l 1^ 

0A 30 
00 31 

?E 35 

r r 



Listing 3. Machine Language Graphics Table 



a 



osi 

SOFTWARE 
BOB RETELLE 

2005 A VWHITTAKERRD 
YPSILANTI,MI.4na7 

.OK J 



(§) 



□an 




a.£.aL_ 





MEMOREX 




Floppy Discs 


J 


1 "^ 


^ 

^ 


Lowest prices WE WILL NOT 
BE UNDERSOLD!! Buy any 

quantity 1-1000. Visa, Masterchatgc 
accepted. Call free (800)2354137 
for prices and information All 
orders sent postage paid. 

PACIFIC EXCHANGES 

100 FoolhJil Bkd 

San Luis Obispo. C A 
m 93401 (In Ca! call 
P (HAS). '543- 1037) 


^ 





92 



COMPUTE! 



March. 1981 Issue lO. 




Keyprint 
Revisited 

Eric Brandon 
Islington, Ontario 
Conodo 

When I first saw KEYPRINT by Charles Brannon 
in the NOV/DEC 1980 issue of COMPUTE! I 
thought my printer problems were over. Not so! As I 
read on, I discovered that KEYPRINT was only fQr 
the new upgrade ROMs, and I had the old original 
ROMs. Furthermore, I knew no machine or 
assembly language. I could: 

a) Get new ROMs (and give up half my pro- 
gram library). 

b) Learn assembly language and modify 
KEYPRINT for the old PETs. 

c) Give up. 

I chose solution b. I purchased books, 
assemblers, disassembler, and all the paraphenalia 
associated with assembly language programming. 
Here is the resuU of my efforts: KEYPRINT for old 
ROM PETs. 



C* PC 


SR 


RC 


y.R 


VR 


SP 








. ; CbED 


00 


38 


00 


32 


FE 








M 0:3:: 


iiR 03CF 

















1 


-1 


■-J 


4 


5 


6 


-7 

1 




033fl 


i 


R9 


03 


sn 


Ifl 


02 


R9 


47 




0342 


8D 


19 


02 


58 


60 


RD 


03 


02 




034H 


C3 


45 


ri0 


03 


20 


54 


03 


4C: 




■ 0352 


•35 


E6 


fl9 


30 


85 


20 


R9 


00 




035fl 


35 


IF 


fly 


04 


sn 


64 


02 


85 




0362 


Fl 


20 


ER 


F0 


20 


32 


Fl 


R9 




036R 


19 


35 


^'iii! 


R9 


011 


85 


21 


20 




0372 


l!2 


FF 


Fiy 


11 


RE 


4l: 


E8 


E0 




03 7 n 


0C 


110 


02 


R9 


91 


20 


1(2 


FF 




0382 


H0 


00 


El 


IF 


29 


7F 


flfl 


El 




03SR 


IF 


45 


21 


10 


0B 


Bl 


IF 


35 




0392 


21 


29 


80 


49 


92 


20 


ri2 


FF 




03yfl 


Sfl 


C9 


20 


B0 


04 


09 


40 


D0 




03R2 


0E 


C9 


40 


90 


0R 


C9 


60 


B0 




03nn 


04 


09 


30 


D0 


02 


49 


C0 


20 




03B2 


ri2 


FF 


CS 


C0 


iilO 


90 


CE 


R5 




03Bfl 


IF 


€3 


■~~p 

C- 1 


?;.■=; 


IF 


90 


02 


E6 




03C2 


20 


C€ 


22 


D0 


R6 


R9 


0D 


20 




03CR 


ri2 


FF 


4C 


Of. 


FF 


bf 


54 


00 



First, type in the hexadecimal (base 16) code 
with your monitor. If you don't know how to do this, 
consult your (or anyone else's PET manual. 

Once you have entered it, type: 
M 033A 03CF 

and compare what you see with what is on this page. 
If they don't correspond exactly, either fill in what 
doesn't match (remember to hit RETURN at the 
end of each line), or start over. 

When KEYPRINT is in memory correctly, type: 
S 01, KEYPRINT, 033A, 03CF 

to save it on tape. 

An 'X' command will get you out of the 
monitor. Type: 
SYS 826 

to initialize KEYPRINT. The cursor should reap- 
pear almost instantly. If it doesn't, you have made a 
mistake in the first 12 bytes (numbers). LOAD it, 
and check again. 

Hopefully, your cursor came back. If it did, hit 
the ' \ ' key and your screen should be dumped on 
the printer. If it doesn't, you have made one of the 
following mistakes; 

a) Typing error. 
SOLUTION: Start again. 

b) Your printer has a secondary address other 
than 4. SOLUTION: POKE 861, SA 

c) You forgot to initialize. 
SOLUTION: SYS 826 and hit the key 
again. 

d) You hit the wront key. 

SOLUTION; Hit the key to the right of the 
ampersand. 

e) You tried this program on something other 
than an old ROM PET. 
SOLUTION: Move on to the next article. 

You can also make KEYPRINT work without 
hitting a key (it doesn't even have to be initialized) 
with an SYS 852. 

When KEYPRINT is active (hitting ' ' will 
make it work), the PET will neither LOAD nor 
SAVE properly. There are two ways of deactivating 
KEYPRINT: 

a) POKE 537,133:POKE 538,230 

b) Typing LOAD or -^SHIFT^ RUN/STOP, 
pushing PLAY, FAST FORWARD, or RE- 
WIND on the cassette and BREAKing it with 
the stop key. If the cassette motor doesn't run 
before you BREAK the LOAD, KEYPRINT 
will not be deactivated. 



March. 1981, Issue lO. 



COMPUTE! 



93 



DO. you mn to plhv first 



I. J 



I u rLHT r ir-.o i ; 

I fl f 1 1 f 

t' 4 1' 





KEYPRINT can always be revived with an SYS 
826. 

Finally, memory location 843 contains the 
number representing (he key that must be hit to 
dump the screen. To change the key, Type: 
FOR T = 1 TO 1E6:PRINT PEEK(515):NEXT T 
You will see a column of 255s going up the screen. 
Hit the key you wish to assign as THE key. The 
255s will change into another number, Remember 
that number. BREAK the loop with the STOP key, 
and POKE 843, n where n is the number you saw 




WOFIDPROPACK and JINSAM are Irademarks ol 
jm. MicroSysiertis. Inc. 
WordPro IS a irademark ol Professior^al 
Software. Inc 



"This module 
is much more 
powerful than 
you can 
imagine," 

Robert Baker, 
February, '81 KILOBAUD 

With WORDPROPACK, 
JINSAM's WORDPRO 
interface, you obtain 
the ultimate "state of 
the art" business tool. 
And, WORDPROPACK 
is just one of seven ac- 
cessory modules and 
systems available with 
JINSAM Data Manager. 

JiNSAM is Commodore 
approved. JINSAM is 
available for all Com- 
modore 32K microcom- 
puters. 



Send only $15 for your 

own 84K 5 program 

demonstration system 

or 

SEE YOUR NEAREST 

COMMODORE DEALER 

FOR A DEMONSTRATION 

JINI MICRO- 
SYSTEMS, INC. 

P.O. Box 274 • Riverdale, N.Y. 10463 
PHONE: (212) 796-6200 




94 



COMPUTE! 



MofCh. 1981. Issue lO, 



when you hit the key. 

I hope you find the program useful. I would like 
to thank Jim Butterfield for sharing some memory 
locations with me. If anyone wishes more informa- 
tion on the program, or if anyone wants to trade 
their programs with me please write to: 

Eric Brandon 

36 Hartfield Road 

Islington, Ontario, Canada 

M9A 3C9 



H ■ ,- . . 1^='- 



b:H 






PETTERM 



Terminal 
Program 





INTELLIGENT 
DATA COMMUNICATIONS 



Use your PET as an intelligent terminal. Access timeshare systems 
and networl<5 such as the Source or Telenet. This is an interrupt driven 
system with buffered input/output. Unlike dumb terminals, the PET 
can do other tasks instead of having to wait for incoming data. This 
flexibility allows many advanced features. 



These are complete assembled hardware and software packages. 
All include line editing/resend, auto-repeat, shift lock, output to IEEE 
printer and much more. Delivered on cassette or disk. Also, available 
for Commodore 8010 modem or Livermore Star 488 modem. 



PETTERM r All fMturn above S75.00 

PETTERM M All (aaturw of I, plui local text editor 

with down-loading cspabilltv • . S90.00 

PETTERM in All feature* o» M, plus 80/132 column 
scrolling window for uiflwinfl formatted 
outputs wider than 40 columns. 
$100.00 




V/S4- 



Mo-f-t^ut-mr-^ -*»ot~ 



i.«lII c»^n>»=»-i"t«M~a 



Source mail TCE995 



1.903 Rio OrAnd* 

flu«-tin,T»*** 

767 B5 



1-512-477-2287 



P.O. iox e4«3 

nustin.TfxAS 
78712 




March, 1981. Issue lO. 



COMPUTE! 



95 



Qhonne/ a 




OMNIFILE CBMorTRS-80 $30 

Omnifile is a versalile, in-memory database program with sorting, formatting, and computational features. 
Records can be entered, edited, and processed with a single letter command. Omnifile applications include 
inventory records, mailing lists, sales iournals and coHection lists. Records can be slored on the Commodre floppy 
disks or on the tape cassette. Omnifile uses approximately 6k of RAM memory. Up to 500 records can be contained 
in memory in a 32k CBM at any time. Multiple files are easily accessed from disk or tape. Items can be sorted, moved, 
inserted and reformatted. Calculations can be made and totals can be printed. The Omnifile package includes the 
program with sample data, listing and manual, and will operate on the large keyboard Commodore PET or CBN/I 
computers with at least 16k memory. Also available on diskette for $36. An abbreviated version, Data Logger, 
requiring only 1 k of RAM is availabie on cassette for SI 5. 

GENERAL LEDGER/PERSONAL LEDGER CBMorTRS-80 $30 

General Ledger is a complete double entry bookkeeping system with provisions for budgeting and keeping 
records of income, deductible and non-deductible expenses, assets and liabilities. Simple interactive features allow 
entering transactions, adding or editing accounts, and printing of a detailed income statement and balance sheets. 
Data can be stored on the Commodore floppy disks or cassette. General Ledger occupies about 6.2k of RAM 
memory, allowing approximately 200 accounts on a 1 6k machine. Transaction files can be accessed by our Omnifile 
database program for complete analysis, sorting by date, account number, etc. The General Ledger program will 
operate on the new Commodore PET or CBM microcomputer systems and comes with sample data, listing, and 
manual. Also available on diskette for $36. An abbreviated version allowing about 35 accounts on a 1 .0 or 2.0 BASIC 
8k PET is available on cassette for $20. 

EXPLORE CBM $15 

I nspired by the computerized fantasy simulation "Adventure," Explore is a conversational program which operates 
on the Commodore PET with only 8k bytes of memory. Explore contains four adventures in which you operate a 
computerized tank, hunt treasure in a magic cave, explore the mall in Washington D.C., and survive in a haunted 
castte. Explore package includes introduction, five data files, and complete manual. Available from Channel Data 
Systems on cassette for $15. Indication of old or new ROMs is requested. 

CHANNEL DATA BOOK for PET CBM $20 

A complete hardware and software reference service listing descriptions for over 1400 software programs and 
over 200 peripheral devices for PET. Also includes an information sources section, and addresses for Commodore 
Dealers in the USAand Canada, Commodore Vendors, and PET user groups. Designed toorganize documentation, 
newsletters, listings, and other user selected information in an attractive 3-ring binder. 

ACCESSORIES 

PORT NOISE COMPLETE Speaker-amplifier for Commodore PET or CBM with connector (M & N pin) all 

ready to plug in— $20. 
IEEE/USER PORT CONNECTOR 24 pin connector, With backshell— $7. Without backshell— $4. 
C-1 TAPE CASSETTES High quality AGFA tape with screw type case. SI 0/1 or S75/1 00. 

Cash, Checks, Money Orders, VISA, Mastercharge 
Add $2 shipping for each order— C0D-$3. 50 
For foreign orders please inquire for pricing 

CHANNEL DATA SYSTEMS 

5960 Mandarin Ave. Goleta, CA 9311 7 805-964-6695 



V6 



COMPUTE! 



March 1931. issue lO. 



Learning 
About 
Garbage 
Collection 

Jim Butterfield 

If you are blessed with Commodore's newest ROM 
4.0 system, you won't need to worry about garbage 
collection. But users with Original and Upgrade 
ROMs will run into it, and they will find it 
worthwhile to learn more about how it works. 

Garbage collection is misnamed. It should be 
called garbage disposal or preferably memory 
reclaiming. Whatever you call it, the symptoms are 
highly visible and annoying: a long pause during 
which the computer appears to be dead. 

There are methods to overcome many garbage 
collection delays. First, however, it's worthwhile 
looking into what causes it and how it behaves. We'll 
perform a series of experiments to disclose the 
characteristics of garbage collection. 



Part 1: Experiments 

Type in the following program: 

100 DIM Ai(255) 

110 FORJ = I TO 255 

120 A$G) = "A" + "B" 

130 NEXT J 

500 REMARK: FORCE COLLECTION WITH FRE(O) 

510 PRINT "STARTING" 

520 Z = FRE(O) 

530 PRINT "FINISHED" 

Type RUN. There will be a pause of over five 
seconds between the printing of the words START- 
ING and FINISHED. This is the infamous garbage 
collection pause; while it's in progress, the 
RUN/STOP key doesn't work and the computer ap- 
pears to be dead. 

Note that there is in fact no garbage to be col- 
lected: all the strings we have manufactured are still 
live. But the delay is still there. 
Conclusion #1: You can have substantial garbage collec- 
lion delays even when you have little or no garbage. 
Now that the program has run, type GOTO 500. 
Garbage collection will take place again on the same 
strings. It's just as long as the first time. 

Conclusion #2: You don 't save time on a garbage collec- 
tion even though your strings were collected recently. 
Add the following lines to the above program: 



200 FORJ = 1 TO 255 
210 A$(J) = "AB" 
220 NEXT J 



Type RUN. The words STARTING and FI- 
NISHED print with very little delay between them. 
The garbage collection delay has vanished! 

What has happened here? The string AB in line 
210 is used exactly where it lies in the Basic pro- 
gram; there's no need to repack it into "dynamic 
string memory". As a result, this type of string 
doesn't need collection. 

In contrast, the string built in line 120 had to be 
manufactured by concatenation, and thus needed to 
be stored in general memory. 

Conclusion #3: Strings supplied within the program don't 
contribute to garbage collection delays. This also applies to 
strings supplied within DATA statements. 
If you listed the program as we have run it so far, 
you'll see that we have created a good deal of gar- 
bage. All of the strings generated by line 120 were 
later thrown away and replaced by the strings in line 
210. Yet there was almost no garbage collection 
delay. 



Conclusion #4: Garbage (abandoned strings) don 't con- 
tribute much to garbage collection delay. Only the strings you 

keep cost you time. 

Now let's change two lines of our program to in- 
crease the number of strings we are generating. 
Change the following lines: 
100 DIM AS(255), BS(255) 



210 BI(J) - LEFTJ("HELLO",4) 
This time, we're going to manufacture twice as many 
strings. Should we expect the garbage collection time 
to double over our previous five seconds? 
Type RUN and see. 

This time, garbage collection took over twenty 
seconds. 

Conclusion #5: Garbage collection time is proportional to 
the square of the number of dynamic (manufactured) strings. 
Now for the final experiment. Type in the following 
lines: 
Original ROM: 

450 XI = PEEK(134) ; X2 = PEEK(135) 

460 Yl = PEEK(130) : Y2 = PEEK(131) 

470 POKE 134, Yl : POKE 135,Y2 

600 POKE 134,X1 : POKE 135,X2 

Upgrade ROM: 

450 XI = PEEK(52) : X2 = PEEK(53) 
460 Yl = PEEK(48) : Y2 = PEEK(49) 
470 POKE 52, Yl : POKE 53, Y2 
600 POKE 52,X1 : POKE 53,X2 

What will these additions do? Just before garbage 
collection begins, it sets the top-of-Basic memory 



March. 1981. Issue 10. 



COMPUTE! 



97 



BALANCE FORWARD 

ACCOUNTS 
RECEIVABLE 

FOR THE COMMODORE 32K 
COMPUTER SYSTEM 



635 Customers. 2000 Invoices Per Month. 

(2040 Disk) 

IVIay Be Used As A Stand Alone Progrann Or 

Interfaced With The CMS Software Systems 

General Ledger. 

Individual Credit Limits And Finance Charge 

Rates For Each Customer. 

Uses Standard NEBS 9060 Statement Forms. 

Allows Immediate Account Status Inquiry. 

Full Reports Including Customer File With 

Balances, Accounts Over Credit Limit, Accounts 

Over 60 Days, Etc. All Reports In Either Account 

Number Or Customer Name Order. =^ 

Full Disk Backup And Error Correcting Capability. 

Even From Hardware Or Power Failures. 

Fully Prompted For Fast, Easy Data Entry Even By 

Inexperienced Operators. ,^„_„_ 




SEE YOUR COMMODORE DEALER FOR A COMPLETE DEMONSTRATION 

CMS Software Systems, Inc. 

5115 MENEFEE DRIVE • DALLAS, TX 75227 • (214) 381-0690 



98 



COMPUTE! 



March. 1981. Issue lO. 



Skyles Electric Works 



BASIC Programmer's, Toolkit ^ Disk-0-Pro®, Command-0® 

For PET® Owners Who Want More Fun 
And Fewer Errors with Their Programs 

Here are thirty-five commands you'll need, all on dual chips you can install in two 
minutes without tools, on any PET or PET system. 2KB or 4KB of ROM firmware 
on each chip with a collection of machine language programs available from the 
time you turn on your PET to the time you shut it off. No tape to load or to interfere 
with any running programs. 

For PET/CBM 2001-8, -8N, -16N/B, -32N/B, 3016 and 3032 
BASIC Programmers TooJkir ' commands 

AUTO^^ DELETE*'* RENUMBERS" HELP'^ TRACE'^^ 
STEP^d OFF*'' APPEND^d DUMP*'^ FIND^'^ 



BASIC Programmers Disk-0-Pro< 



,0") 



CONCAT^ao DOPENs«° DCLOSEbso RECORDbs" HEADER^^o cOLLECT^^" 

BACKUP^so COPYS80 APPEND^ao DSAVE^ao DLOAD^^o CATALOGss" 

RENAME eao SCRATCHseo DIRECTORY^^" INITIALIZERS MERGERS EXECUTEe's 

SCROLL*^ OUT^'^ SET*'' KILL^'' EAT*" PRINT USING^^ SEND^s beEP^^ 



7DIVISI0N BY ZEOO ERROR IN SOU 
BEAOr. 

HELP 



PRESS PLAV ON TAPE II 
OK 

SEAnCKING FOB INPUT 
FOUND INPUT 
APPENDING 



BEADV. 
DUMP 
A1= 10 
BW=-<.I 
Ct = -Hl" 




NOTES: 

ed — a program editing and debugging command 

B80 — a BASIC command also availabte on Commodore CBIVl® 8016 and 8032 computers. 
BS — a Skyles Electric Works added value BASIC command. 
BASIC Programmers Toolkit® is a trademark of Palo A!to IC's. 

BASIC Programmers Disk-O-Pro®, Command-0® are trademarks of Skyles Electric Works. 
PET®, CBM® are trademarks of Commodore Business Machines. 
AVAILABLE: USA/CANADA; Please contact your local dealer 
England: Calco Software Lakeside House, Kingston Hill. Surrey KT2 7QT 
GERMANY: Unternehmensberatung, Axel Brocker Lennebergestr 4, 6500 Motnz 
Japan: Systems Formulate, 1-8-17 Yoesu Shinmoki-cho B!dg. IIF Chuo-ku, Tokyo JAPAN 103 
Phone or write for information. We'll be delighted to answer any questions 
and to send you the complete information pacl<age. 



Skyles Electric Works 



231 E South Whisman Road 
Mountain View, CA 94041 
(415)965-1735 



March, 1981. Issue lO. 



COMPUTE! 



<?9 




Skyles Electric Works 



BASIC Programmer's, Toolkit®, Disk-0-Pro^^ Command-0^ 

For CBM® Owners Who Want More Fun 
And Fewer Errors with Their Programs 

Here are nineteen commands you'll need, on a single chip you can install in two 
minutes without tools, on any CBM or CMB svstem. 4KB of ROM firmware on 
each chip with a collection of machine language programs available from the time 
you turn on your PET to the time you shut it off. 

For CBM 8016 and 8032; BASIC 4.0 
BASIC Programmers Command-0^ 

AUTO^d DUMP'^ DELETE^d FIND«<^ (improved) HELP^'^ KILL^'^ OFF^'^ 

TRACE^^ (improved) RENUMBER^'^ (improved) INITIALIZEss MERGERS MOVERS 

EXECUTE^s SCROLL^^ OUT^^ SEP'^ SEND^^ PRINT USING^^ BEEP^^ 



1W GOSUI 1U 

10S PBINT USING C$, A, BS 

130 INPUT "TIliE", DS 

131 INPUT ■DAY". Et 
160 IFB-; -C THEM IDS 
lao FOR X<=ITO« 

1M PRINT Y(X):NexT 
1(4 RETURN 
200 I-Xfl9 
READV 

RENUMBER 110, 10. 105-1S4 

BEADY 

LIST 
100 GOSUB ISO 
tlOPRINTUSINQCI.A. Bt 
120 INPUT -TIME-, 0$ 
130 INPUT "DAV.EJ 
1U IPe<: r.C THEN 110 
150 FOR X=rTO« 
160 pmm- Y(X|:NEXT 
iro RETURN 
2O0l=WI> 

HEADY 



UEItGE D1 "BUY NOW" 

SEARCHING FOR BUY NOW 
LOADING 

READY 
RENUMBER 10A, 10 

READY 

FIND Bt 

no PRINT USING AS,iS>[ID-'CS»DS 

21)0^= "NOW IS THE TIME" 



5M BA^BA- 1 

590 RA=123'5»3Z+BA-ia 

MO F BA=143 THEN SSO 

tlO RETURH 

020 «=-PBOFIT U. ###.## DAILY" 

UO PRINT USING CS, Pt 

640 W-- LOSS H, ttt.lt DAM.V 

SSO PRINT USING Dl, LI 



PROFIT *1,»8.61 DAILY 
LOSS * 0.00 DAILY 



NOTICE 

When you order Command-0, we will loan 
you a Toolkit until we deliver Command-0. 

NOTICE 



PRICES: 



BASIC Programmers Toolkit® {chip only) 
BASIC Programmers Disk-0-Pro® (chip only) 
BASIC Programmers Command-0® (chip only) 
Interface boards (needed sometimes) 
Instruction Manual (with redeemable $5,00 coupon) 



$40.00 

$75,00 

$75,00 

$20.00-$50.00 

$5.00 




Shipping and handling $2.50 USA/Canada, $10.00 EuropelAsia 
California residents please add 6% or 6-ll2°/o sales fax as required 
Reserve your Dlsk-0-Pro, Command-0 today 
Too/tof® immediate delivery, Disli-0-Pro delivery in December, Commar\d-0 delivery in January 
VISA, MASTERCHARGE ORDERS CALL (800) 538-3083 (except California residents) 
CALIFORNIA ORDERS PLEASE CALL (408) 257-9140 



Skylcs Electric Works 



231 E South Whisman Road 
Mountain View, CA 94041 
(415) 965-1735 



lOO 



COMPUTE) 



Morch. 1981. Issue lO. 



pointer lower. After garbage collection completes, it 
restores the pointer to its original value. 

There are the same number of strings as 
previously, so it seems that garbage collection time 
should not be affected, and should stay at twenty 
seconds or so. 

Type RUN, Surprise! Garbage collection time 
drops to zero! 

Conclusion #6: Garbage collection is not performed on 
strings located above the lop-of-Basic-memory. 
The strings are not affected — but no garbage collec- 
tion took place up there either, so that unwanted 
strings would not be discarded. 

Part 2: Techniques For Reducing Garbage 
Collection Time 

Case 1: Eliminating concatenation garbage. 
Suppose we're inputting a string and using con- 
catenation to put it together. Sample coding might 
be: 

800 REMARK: INPUT STRING 
810 .4$ = "" : rem start with null string 
820 GET BS: IF BJ = "" GOTO 820 
830 IF BS = CHR$(I3) GOTO 850 
840 AS = AS + BS : GOTO 820 
850 REMARK: AS CONTAINS OUR INPUT 

The problem here is that this type of concatenation 
lays waste a lot of memory. If our input is HELLO, 
ROBERT, the variable A$ will first be set to H, 
then to HE and so on until the full thirteen 
characters are received. Over seventy locations will 
end up containing abandoned strings; and if our in- 
put string were fifty characters long we'd create over 
a thousand bytes of garbage. This kind of thing can 
trigger automatic garbage collection very quickly. 

A little perspective: if A$ and B$ were our only 
string variables, we'd have nothing to worry about. 
Garbage collection would be almost instantaneous. 
But if we had hundreds of other strings lying about, 
they would all go through the collection process, and 
we'd be in time trouble. 

Solution: Before we enter this string-wasting 
routine, insert (at line 805) coding to move the top- 
of-Basic-memory pointer down. Let the concatena- 
tion program run; when it is finished (line 850), force 
a tiny collection with Z = FRE(O) and then restore 
the top-of-Basic-memory pointer. Refer back to the 
experiments for the technique. 

Case 2: Reading in a batch of new strings from a 

file. 

Suppose we read in a whole flock of strings dealing 

with a customer account and place them in one or 

more arrays. No problem so far: the strings will read 

in neatly from a file and there will be little waste 

space. 



Now assume that we've finished with that 
customer and the program goes back to read in 
material for the next account. Danger! The old 
strings are still there, taking up waste space. As we 
read in new material, we may run short of room, 
and garbage collection will automatically be called 
in. It will collect the new strings and quite a few of 
the old ones that we haven't discarded yet. Help! 

Solution; Get rid of the old strings as soon as 
they are not needed by setting them to null strings 
(e.g., A$(J) = ""). Then, when your strings are at a 
minimum — just before reading in the new batch — 
force a collection with Z = FRE(O). Collection will 
be quick, since there are few live strings left, and the 
new information will read into freshly liberated 
memory. 

Case 3; Shuffling strings around 

There are times when you have a lot of strings in an 
array, and you want to change their order. The most 
usual case is that you want to sore them into some 
kind of order. 

To exchange strings four and seven, you would 
tend to code something like: 
700 XS = XS{4) 
710 X$(4) = XS(7) 
720 X$(7) - XS 

Unfortunately, this simple swap leaves three aban- 
doned strings in memory: the old value of XS(4), the 
old value of X$(7), and X$, which will probably not 
be used again. We don't need to do much of this 
before garbage collection kicks in again. 

Solution: Use a technique called an index ar- 
ray. Instead of changing the strings and causing gar- 
bage, change the index instead. The above coding 
will change to: 
700I7o=I%(4) 

710 I%(4) = I%(7) 1 

720 1%(7) = 1% 

We must be careful to set up array 1% at the start, 

so that I%(4) =4, for example. At any time, we can 

call up string number four by referring to : 

X$(I%(4)). Here's a simple example: 

100 REMARK: SIMPLE BUBBLE SORT 

no DIM NS(2O),I%(20) 

120 PRINT "INPUT 20 NAMES:" ; 

130 FORJ = 1 TO 20 

140 I7c'0)=J : rem set up index 

150 INPUT NS(J) : rem get string input 

160 NEXT J 

200 F = 

210 FOR J- 1 TO 19 

220 IF NS(I%(J))< =N$(I%(J+ l))GOTO 250 

230 F = 1 

240 1% = I%(J) : I%(J) = I%a + 1) ■■ I%U + 1) = 1% 

250 NEXT J 

260 IF F - 1 GOTO 200 

300 FOR J = 1 TO 20 : PRINT N$(I % (J)) : NEXT J 

You can see that we never move a string, but the 
sort is performed. ^ 



March. 1981. Issue lO. 



COMPUTEl 



Nlicro Computer Industries, LtcL 






v«vK 



^^:i}i-^ln 



-:<ir.#5ii*<«fcJti*;ii+^ 



;:/22Ki'i<"^~'.*-.i 



1520 EAST MULBERRY, SUITE 170 
FT. COLLINS, COLO. 80524 1 
2.^ PHONE 303-221-1955 | 



^ -.'ir;*?;'. 



i3?^aipl:<; 






CREATE-A-BASE 

This data base management program for CBM or PET 32K 
handles most business data processing chores with one 
program, No computer experience required, just turn it on 
and go! 



EXTREMELY FLEXIBLE FEATURES 

Create records with up to 24 fields of data of your 

choosing. 

File up to 650 records on each floppy diskette (1800 if you 

own the 8050 Disit Drive). 

Change or add fields at any time. 

Change data disits without dumping operating program. 

Sort or search by any one or two fields. 

Data can be added as $ amounts, with right hand 

justification. 

Perform arithmetic operations on fields with S amounts 

( + . -, ••/). 

Merge files, change or scratch records, output mailing 

labels. 

Completely interactive with WordPro 3 or 4", output form 

letters, mailing lists, accounts receivable, invoices. 

statements, inventories, even reports on your favorite 

fishing holes (and have more time to go fishing too). 

Start the new year off right with Create-A-Base. 

You'll pat yourself on the back for months. 

Create-A-Base runs on CBM 8032 or 2001 32K machines. 

Available on disk only; list price $200.00. 

For 8032, 4040 or 8050 disk drives (Relative Records) 

S360 

"Word Pro is a registered trademark of Professional 

Software Inc. 



^ 



INVENTORY CONTROL 

Disk based f^or CBM or PET 3ZK 

Inventory 

Point of Sale 

Accounts Receivable 

Inventory a minimum of 2000 items per diskette (a lot 

more with the 8050 Disk Drive.) 

Complete records of merchandise purchased and sold. 

Update files and supply cost values of stocked Items. 

Update cash and credit sales, write invoices, remove sales 

from inventory and keep running total of sales tax. 

Cash sales and credit sales. 

Maintain a complete record of items charged, payments on 

account, print bills, sort flies and print out summary 

reports. 

List price is only $200.00. 



mk 



i 






mr- 




WORDCHECK 

WordCheck is the secretary's lifesaverl 

Our newest and already one of our fastest selling 

programs. 

This program interacts with WordPro 3 or 4*. Run your 

letters and documents through WordCheck it checks EVERY 

SINGLE WORD for spelling or typographical errors. 

WordCheck contains a spelling list of most commonly used 

words. Any words that do not match this list will show up 

on your screen. If these flagged words are all right pass 

them by with the pressing of a single key or 

AUTOMATICALLY add them to the spelling list without 

having to retype them. 

WordChecl< is ideal for doctors, lawyers and anyone else 

doing technical writing. WordChecit is so simple to learn to 

use your secretary can be working with it in a matter of 

minutes. 

Your worries are overl No more scrambling for the 

dictionary when you have to write "fluorescent". 

"nucleotide" or "receive". WordCheck does the worit for 

you quickly, thoroughly and accurately. 

Available for CBM and PET 32K" * machines with dual disk 

drives. List price is only $200.00. 

" Word Pro is a registered trademaric of Professional 

Software Inc. 

• 'CBM and PET are registered trademarks of Commodore 

Business Machines. 



PET-TERM 

ONLINE TERMINAL SOFTWARE FOR 

THE 8010 OR TNW MODEM 

Machine language routines for speedy performance. 

All necessary screen and keyboard character conversions. 

Control key and special key functions. 

Terminal to Disl< Storage. 

Sequential or Program file transmission capability. 

Return to BASIC at will. 
Operate Half or Full Duplex. 



EXTRAS 

Support programs, such as a 

SEQFILE READ/EDIT/PRINTER which allows you and your 

customers to read, edit and printout those data files you 

will be receiving from the SOURCE and other such data 

bases. Also provided is a SEQ. PROG DECODER which allows 

decoding of operating programs which have been 

transmitted via the 8010 MODEM. 

This program and complete operating documentation lists 

for only S39.95. 




102 



COMPUTE! 



March, 1981. Issue lO. 



Pet Machine 

Language 

Graphics 

David Malmberg, Fremont, CA 



The PET has great graphics for almost any applica- 
tion, especially games. The only drawbacks I have 
found are that sometimes the graphics are not fast 
enough, or certain special effects (such as reversing 
only a section of the screen) cannot be done easily 
or quickly in a BASIC program without resorting to 
writing special subroutines in machine language. 
After many frustrating attempts to get the graphics to 
do exactly what I wanted in various machine 
language routines, I decided to write a general 
machine language subroutine that could be easily 
called from a BASIC program and would give the 
PET a wide-ranging repertoire of graphics "tricks." 

Listing 1 is a BASIC program that POKEs this 
general machine language subroutine into the second 
cassette buffer and into the top three pages (a page is 
256 bytes) of memory. This program then resets the 
memoy boundaries to protect the machine code from 
any BASIC programs. This is done automatically 
and is independent of the memory size. The program 
will also determine which of the various ROMs are 
in the PET and modify the machine code according- 
ly. It will work with "old", "new" of "4.0" 
ROMs. However, it will not work with the new 
80-column PETs. 

Once the subroutine has been loaded, it will 
give your BASIC programs significantly enhanced 
graphics capabilities. Specifically, you will be able to 
define a rectangular area on the screen and 
manipulate that area at machine language speed. 
The rectangle may be as small as a single space or as 
large as the entire screen. The area may be 
manipulated in the following ways: 
Filled with any character 
Reversed 

Flashed on and off (i.e., fast multiple reversing) 
Repositioned elsewhere on the screen 
Moved (animation) in any direction at any speed 
with or without screen wraparound 
Made to grow or shrink in size 

Using The Subroutine 

Your BASIC program would use the subroutine by 
POKEing various values into the subroutine's 
parameter list and then issuing a SYS(826) com- 
mand. The parameter list and the corresponding 



POKE locations are given below: 
LOCATION DESCRIPTION 

700 Starting row (SR) 

(0 to 24) 

701 Last row (LR) 

(0 to 24) 

702 Starting column (SC) 

(0 to 39) 

703 Last column (LC) 

(0 to 39) 

704 Fill character (FC) 

705 Rr>w move direction (RD) 

= Up 

1 = Down or to side 

706 # of rows to move (RM) 

707 Column move direction (CD) | 

= Left 

1 = Right or even 

708 # of column to move (CM) 

709 # of jiffies delay between iterations QD) 

710 Wraparound factor (WF) 

= Wraparound is OK 

1 = Disappear off screen edge 

2 = Move to edge only 

711 # of iterations before returning to BASIC (IT) 

The letters inside the parentheses are short-hand 
variable names to which I have found it useful to 
assign the values of the POKE locations at the begin- 
ning of the BASIC program using the subroutine. In 
this way I don't have to remember that Jiffy Delay is 
location 709, rather I can just POKE JD,6 if I v/ant 
a 6 jiffy (i.e., 1/10 second) delay between iterations. 
Using these parameter names also reduces the chance 
of errors, and is faster since BASIC handles variables 
faster than constants. I recommend you adopt the 
use of these parameter variables when using this 
subroutine. 

Listing 2 is a BASIC program that demonstrates 
the full range of capabilities of the graphics 
subroutine. You are urged to key it in, run it and 
then study it to see Just how each of the graphic ef- 
fects was obtained. You will find it very informative. 

At this point it is appropriate to describe in 
more detail just how (he parameters can be used to 
generate various graphic effects. NOTE: In the 
discussions that follow all of the parameters are 
assumed to be zero unless specifically stated other- 
wise. In fact you will find it convenient to GOSUB 
to a routine to zero all of the parameters before 
beginning any new graphics, e.g., GOSUB 7000 in 
Listing 2. 

Defining The Rectangle 

The rectangular area is defined by the values of the 
parameters in locations 700 to 703. The area is the 
intersection of the defined rows and columns. The 
routine assumes that the "first" row or column on 
the screen is number zero, not number one. If the 
value of the starting row (starting column) is greater 
than the last row (last column) the routine will 
assume that the rectangle "wraparound" the edge of 
the screen. The rectangle may be the entire screen or 
a single space. , , 



Morch. 1931 Issue lO. 



COMPUTE! 



103 



;■^■^^',■^^^l■.w^^ W'¥^^^ ^^ff^^'^?^ 




i ,,, 



THE FLOPPY DISK 
ALTERNATIVE 

PET/BETA-1 



11 your data and program handling requirements are 
minimal, a mini-disk may be for you. If you want to access 
large amounts of data, program libraries, flexible user- 
defined data formating, and easy to understand documen- 
tation, CONSIDER the PET/BETA-1, 

The PET/ BETA- 1 is a fast digital tape system incorporating 
the BETA-1 drive, with a flexible user-oriented operating 
system. The double-density drive has high-speed random 
access to over 1 million bytes per digital cassette with a 
transfer rate of 1K, second, 

The PET, BETA-1 operating system extends your BASIC 
with 25 new commands executable from the keyboard or 
from a BASIC program. The new commands add sophis- 
ticated data and programming capabilities easily exceed- 
ing those of the Commodore disk. 

For programs PET/ BETA-1 offers program chaining and 
merging with dynamic memory management. Machine 



language files can be directly linked to user-defined 
commands, and any memory segment can be saved and 
relocated to any RAfvl location. 

PET/BETA-1 offers sophisticated data management with 
userdefined record and field formats, up to 26 named 
fields per record, with true random access to any record in 
the file. These functions are available with easy to use 
commands. 

With the PET/ BETA-1 you control huge amounts of data 
with no operator intervention. The operating system 
supports up to 4 BETA-1 drives. 

This is acomplete hardware/software package, assembled 
and complete with all connectors and extensive user- 
oriented documentation. We provide technical assistance 
by phone and mail. 

PET/BETA-1 System 

Single density (512 k/drive) $555.00 

Double density (1 meg/drive) 5700.00 

"vlANUAL (aDphcabie lo uurchaseJ ~" 



SIO.OO 



PET/CBM SOFTWARE 



FORTH Interactive high level compiler and 
operating system 5-10 times faster than PET 
BASIC. High level block structured language. 
This is a true fig-FORTH implementation for 16 and 
32K PETs. 

TERMINAL Turn your PET into an intelligent 
terminal with one of our terminal packages. 
These are complete assembled hardware and 
software packages. All include line edit- 
ing resend, repeat key. shift lock, output to CBM 
printer, and more. Delivered on PET cassette 
with manuals. Inquire for modem prices. 



fig-FORTH, with editor, assembler $50.00 

with floating point and sthngs S6G.0O 

with floating point, strings, macro-assembler . . $70.00 
cassette and disk interface available. 



PETTERM 1 All features above $ 80.00 

PETTERM II All features of 1, plus local 

text editor with down-loading capability . . 90.00 

PETTERM Hi All features of II. plus 

80 132 column scrolling window for 

viewing formatted outputs wider than 

40 columns 100.00 




Software for smalf computers 



1 903 Rio Grande, Austin, Texas 78705 
P.O.B. 8403, Austin, Texas 7871 2 
1-512-477-2207 




FSS in an aulhoiized MECA Inc. dealef 

Texas residenis add 5*o sales tax 

PET ts a registered Irademark o1 Commodore. Inc 



lOJ 



COMPUTE! 



March, 1981 Issue lO. 



Filling The Area 

If you wish to fill the rectangular area with a 
character, location 704 (short-hand FC) is POKEd 
with the ASCII value of the desired character. For 
example, the following lines of code will build a 
border around the screen "W" wide composed of 
character "C": 

1 POKE FC,C ; POKE SR,0 : POKE LR,24 

2 POKE SC,40-W : POKE LC,W-1 : SYS(826) 

3 POKE SCO ; POKE LC,39 

4 POKE SR,25-W : POKE LR, W-1 : SYS(826) 

Lines 1 and 2 generate the sides of the border, and 3 

and 4 the top and bottom. Notice that the routine 
uses the wraparound (start > last) feature to 
generate two sides of the border with the same 
subroutine call. 

Reversing And Flashing 

When you wish to reverse the area, the Fill 
Character, location 704, is POKEd with zero. A 
special case of reversing is to flash the rectangle on 
and off with fast multiple reversing. This effect is ob- 
tained by POKEing location 711 (IT) with the 
number of times the area is to be reversed, and loca- 
tion 709 (JD) with the number of jiffies to delay be- 
tween each reverse cycle. For example, the following 
code will flash the entire screen on and off by revers- 
ing it "N" times at a speed of "D" jiffies: 

1 POKE FC,0 : POKE JD,D : POKE IT,N 

2 POKE SR,0 : POKE LR,24 

3 POKE SC,0 : POKE LC, 39 : SYS(826) 

Repositioning The Area 

The rectangle can be repositioned in a different loca- 
tion on the screen by setting the parameters in loca- 
tions 705 to 708. Location 705 (RD) is POKEd with 
a zero if the relative displacement of the new position 
is up and with 1 if it is down or even. Location 707 
(CD) is POKEd with if the displacement is left and 
with 1 otherwise. Locations 706 (RM) and 708 (CM) 
are the number of rows and columns, respectively, 
the area is to be displaced. For example, 

1 POKE RD,0 : POKE RM,IO 

2 POKE CD,1 : POKE CM, 5 

will reposition the area five columns to the right and 
ten rows up. 

If the "old" area is to be blanked out after the 
repositioning, the Fill Character (FC = 704) should 
have been previously POKEd with 32, i.e., an 
ASCII blank. If FC is zero rather than 32, then both 
the "old" and "new" areas will be visible on the 
screen after returning from the graphics subroutine. 

Since this repositioning is done by relative 
displacement rather than absolute positioning on the 
screen, there will be instances when the new position 
will be "off the edge." Just how the routine handles 
these situations is determined by the value of the 
Wraparound Factor (WF = 710). If this value has 
been POKEd with a zero, the routine will 
automatically wraparound to the other edge(s) of the 



screen. If WF is 1, the portion of the rectangle that 
goes over the edge will not be shown. If WF is 2, the 
routine will automatically recalculate the reposition 
parameters so that the rectangle stops just at the edge 
of the screen. 

Motion Or Animation 

Motion, or animation, is handled very much like 
repositioning, except that the increments of displace- 
ment are smaller (typically only one row and/or col- 
umn) and the number of iterations (IT =711) and jif- 
fies delay (JD = 709) are used to control the distance 
and speed of the movement. For example to show the 
rectangle moving up and to the right at a 30 degree 
angle at a relatively fast pace these instructions could 
be used; 

1 POKE RD,0 : POKE RM,1 : POKE CD,1 : POKE CM, 2 

2 POKE IT, 10 : POKE JD,2 : POKE FC,32 ; POKE WF,0 

Setting WF to zero and FC to 32 assures the "old" 
area is erased and that wraparound is allowed if ap- 
propriate. Even though JD was set to 2, the actual 
"speed" of the movement will depend on the size of 
the rectangle — obviously larger areas take longer to 
move than smaller ones — even at machine language 
speed! You should experiment with various values of 
JD to get the speed you want for your specific areas 
to be moved. 

After returning from the subroutine, the 
parameters defining the rectangle will be 
automatically updated to correspond to the new loca- 
tion, so it is unnecessary to keep track of these loca- 
tions in your BASIC program or to rcPOKE these 
locations before making another move. However if 
you are moving several different areas 
"simultaneously", you should save locations 700 to 
703 after exiting the routine and then rePOKE these 
same values before moving again (if there are in- 
tervening moves of other areas). 

Listing 2 has a number of examples of move- 
ment that should be helpful to you in understanding 
how to use this routine effectively. The code ai lines 
800 to 870 should be particularly useful because it 
shows an easy and fast way to control motion with 
the numeric key pad. 

Shrlnl< And Growing 

Some very interesting graphic effects are possible if 
you use the routine for repositioning or motion but 
do not POKE the Fill Character with a ASCII blank, 
i.e., a 32. If FC is zero, the "old" area is not 
changed as the "new" area is created. This allows 
the total graphic area to give the appearance of grow- 
ing in size. Once the area has grown, FC can be set 
to 32 and the direction of the movement switched by 
180 degrees and the area will appear to shrink. If FC 
is POKEd with something other than zero or 32, 
movement can be handled against a non-blank 
background, or some other characters can be left 
behind as the "wake" of the movement. 



March. 1981, Issue lO, 



COMPUTE! 




afd 



K 



Standard Features: 

• Full power to PET/CBM for a minimum of 
15 minutes 

• Installs within PET/CBM cabinet 

• No wiring changes necessary 

• Batteries recharged from PET/CBM inte- 
gral power supply 



Specifications: 

• Physical Size: 5.5" x 3.6" x 2.4" 

• Weight: 4.5 lbs. 

• Time to reach full charge: 16 hours 

• Duration of outputs: Minimum of 15 min. 

• Voltages: +16, +9, -12, -9 

• Battery Life Expectancy: 3 to 5 years 

• Battery On-Off Switch 



For Use With: 

• Commodore PET/CBM 2001 and 4000 ser- 
ies computer 

• Commodore PET/CBM 8000 series com- 
puter (screen size will not be normal on 
battery back-up] 

• Commodore C2N Cassette Drive 



BATTERY 

BACKUP 

SYSTEIVL 



FOR COMMODORE PET/CBM COMPUTERS 



Never again lose valuable data because of 
power shortages or line surges. BackPack sup- 
plies a minimum of 15 minutes reserve power to 
32K of memory, the video screen and tape 
drive. BackPack fits inside the PET/CBM 
cabinet and can be installed easily by even the 
novice user. BackPack is recharged during nor- 
mal operation and has an integral on-off switch, 

BackPack comes fully assembled and tested. 
Instructions included. 



BackPack is a trademark of ETC Corporation 
CBM/PET are trademarks of Commodore Business Machines 



Designed and manufactured by: 

ELECTRONIC TECHNOLOGY CORPORATION 

P.O. Box G, Old N.C. 42 

Apex, North Carolina 27502 

Phone: [919)362-4200 or (919)362-5671 



Electronic Manufacturing 

Technical Design and Development 

Computer System Technology 



liiiiiiiiiiuiiiiiiiiiiiiii 



ELECTRONIC TECHNOLOGY CORPORATION 



lllllr"™'"™ " 



106 



COMPUTE! 



March, 1981. Issue lO. 



Lines 880 to 980 in Listing 2 give a good exam- 
ple of using the routine to grow and shrink objects. 

Conclusions 

I hope you have as much fun using this routine as I 
did in writing it. If you develop any new or unusual 
uses for this routine drop mc a note — or better yet, 
tape copy of the program. 

If you don't want to spend the effort keying in 
the code in the Listings, send me S5.00 and I will 
send you a tape containing both the graphics loader 
program (Listing 1) and the demo program (Listing 2). 

Listing 1 

10 CLR:POKE59468,12 

20 REM PROGRAM BY DAVID MALMBERG 

30 REM 43064 VIA MORAGA 

40 REM FREMONT, CALIF 94538 

50 REM (415) 651-6921 

60 IFPEEK(50000)=0THENPOKE134,0: 
-,POKE135,PEEK(135)-3:GOTO80 
POKE52 , : POKE53 , PEEK ( 53 ) -3 
CLR 

ZZ=5 3:IFPEEK(50000)=0THENZZ=135 
QQ=PEEK(ZZ) 
PRINT"R"TAB{ 12} "LOADING 2ND -. 

-.CASSETTE" 
PRINT"Mi^MACHINE LANGUAGE GRAPHICS" 
PRINT "M'^^t'tBY DAVID MALMBERG" 
FOR 1= 826 TO 1015 : READDC: POKEI , DC: 

-.PRINT"h" ; I ; DC: NEXTI 
DATA32, 15 0,3, 56, 165, 62, 201, 25, 17 5 
DATA61, 165, 63, 201, 25, 17 6, 55, 165, 6 8 
DATA201,25,176,49,165,6 4,201,40,176 
DATA43, 165, 65, 201, 40, 17 6, 37, 165, 70 
DATA201,40,176,31,165,6 8,208,10,165 
DATA70, 208, 6, 32, 0,16, 56, 176, 3, 32 
DATAll 9, 17, 32, 133, 3, 165, 73, 240, 7 
DATA198,73,240,3,76,98,3,32,168,3 
DATA96, 165, 71. 240, 12, 16 9, 0,141,143 
DATA0, 165, 71, 205, 14 3, 0,20 8, 251, 96 
DATA162,0,181,4 6,188,17 4,2,157,174 
DATA2, 148, 48, 232, 224, 32, 20 8, 241, 96 
DATA162,0,189,174,2,180,4 8,149,4 8 
DATA15 2, 157, 174, 2, 232, 2 24, 32, 208 
DATA240, 96, 169, 0,133, 51, 162, 8,10 
DATA3 8, 51, 6, 49, 144, 7, 24, 101, 4 8, 144 
DATA2, 23 0,51, 2 02, 2 08, 23 9, 13 3, 5 0,9 6 
DATA16 9, 0,133, 1,133, 2, 165, 54, 240 
DATAi7, 133, 48, 169, 4 0,133, 49, 32, 187 
DATA3, 165, 50, 133, 1,165, 51, 133, 2, 24 
DATAl65,2,ig5,128,133,2,96 
PRINT"ii"TAB (12) "LOADING HIGH MEMORY -^ 



70 
80 
90 

100 
110 

120 
130 
140 

150 
160 
170 
180 
190 
200 
210 
220 
230 
240 
250 
260 
270 
280 
290 
300 
310 
320 
330 
340 
350 
360 

370 
380 

390 

400 
410 
420 
430 
440 
450 
460 
470 
480 
490 



AA=QQ*25 6 
FORI=AATOAA+626: READDC: 

-.PRINT"ii";I?DC:NEXTI 
DATA165,62,133,54,32,21 
DATA164,64,165,66,20 8,4 
DATA128,145,1,196,65,24 
DATA192,40,144,236,160, 
DATA228,63,24O,30,232,5 
DATA14,24,165,1,105,40, 
DATA2,230,2,56,176,206, 
DATA1,169,128,133,2,208 
DATA0,133,60,165,67,20 8 
DATA54,229,68,16,3 6,72, 
DATA2,208,21,24,104,101 



POKEI, DC: 

3,3,166,62 

,177,1,73 

0,10,200,56 

0,240,232 

6,224,25,176 

133,1,144 

162,0,134 

,196,96,169 

,87,56,165 

165,72,201 

,68,133,68 



500 DATA169, 0,133, 73, 133, 1,133, 54, 169 
510 DATA128,133,2,24,144,47,201,0,20 8 
520 DATA34, 24, 104, 105, 25, 230, 59, 197, 59 
530 DATA208,16,133,54,24,165,1,105,40 
54 DATAl 3 3, 1,1 4 4, 2 2, 23 0,2, 2 4, 14 4, 17 
550 DATA133,54,32,213,3,24,144,9,16 9 
560 DATA15, 13 3, 60, 104, 16 9, 0,133, 54, 165 
5 70 DATA54, 133, 59, 96, 24, 165, 54, 101, 6 8 

5 80 DATA56, 201, 25, 144, 45, 233, 25, 72,165 
590 DATA72, 201, 2, 20 8, 31, 104, 133, 61, 230 

6 00 DATA61, 16 9, 0,133, 73, 56, 165, 68, 229 
610 DATA61, 133, 6 8, 16 9, 24, 133, 54, 16 9, 131 
620 DATA133,2,16 9,192,133,1,24,144,4 4 
630 DATA201,0,20 8,31,104,198,59,197,5 9 
640 DATA20 8, 16, 133, 54, 56, 165, 1,233, 4 
65 DATA133,1,176,22,198,2,24,144,17 
660 DATA133,54,32,213,3,24,144,9,169 
670 DATA15, 133, 60, 104, 16 9, 24, 13 3, 54,] 65 
680 DATA54, 133, 59, 96, 169, 0,1 33, 74, 165 
690 DATA6 9, 208, 47, 5 6, 165, 76, 229, 70, 16 
700 DATA93, 72, 16 5, 72, 201, 2, 208, 12, 24 
710 DATA104,101,70,133,70,169,0,133,73 
720 DATA240,74,201,0,208,7,24,104,105 
730 DATA40, 24, 144, 63, 169, 15, 133, 74, 104 
740 DATA169,0,24,144,53,24,16 5,76,101 
750 DATA70, 56, 201, 40, 144, 43, 233, 40, 72 
760 DATA165,72,201,2,208,19,104,133,61 
770 DATA16 9, 0,133, 73, 56, 165, 70, 229, 61 
780 DATA133,70,169,3 9,24,144,15,201 
790 DATA0, 20 8, 4, 104, 24, 144, 7, 169, 15 
800 DATAl 33, 74, 104, 16 9, 39, 133, 75, 96 
810 DATA16 5, 67, 208, 11, 165, 62, 133, 55 
820 DATA16 5, 63, 133, 5 6, 24, 144, 8, 165, 63 
830 DATA133,55,165,62,133,56,165,69 
840 DATA20 8, 11, 165, 6 4, 13 3, 5 7, 16 5, 6 5 

85 DATA133,58,24,14 4,8,165,65,133,57 
860 DATAl 6 5, 6 4, 13 3, 5 8, 16 5, 55, 13 3, 5 4 
870 DATA32, 213, 3, 165, 1,133, 52, 165, 2 
880 DATA133,53,16 9,175,133,5 9,166,55 
890 DATA13 4, 54, 134, 77, 32, 70, 16, 16 4, 57 
900 DATA132,76,32,8,17,166,77,165,60 
910 DATA20 8, 14, 165, 74, 20 8, 10, 177, 5 2 
920 DATA132,61,164,75,145,1,164,61,1S5 
930 DATA6 6, 24 0,2, 14 5, 5 2, 19 6, 5 8, 2 4 0,2 5 
940 DATA165, 6 9, 240, 10, 192, 0,208,2,16;) 
950 DATA40, 136, 24, 144, 207, 192, 3 9, 208 
960 DATA4, 160, 0,240, 199, 200, 24, 144, 195 
970 DATA228,56,24 0,66,165,67,240,31 
980 DATA224,0,208,12,162,24,16 9,131 
990 DATA133,53,16 9,192,133,52,208,162 
1000 DATA202,5 6,165,52,233,40,133,52 
1010 DATA176,152,198,53,24,144,147,224 
1020 DATA24, 20 8, 12, 169, 128, 133, 53, 169 
1030 DATAO, 133, 52, 162, 0,24 0,131, 232, 24 
1040 DATA16 5, 52, 105, 40, 133, 52, 144, 227 
1050 DATA23 0,53, 24, 144, 222, 165, 62, 133 
1060 DATA54, 32, 70, 16, 16 5, 59, 133, 62, 165 
1070 DATA63, 133, 54, 32, 70, 16, 165, 59, 133 
1080 DATA63, 165, 64, 133, 76, 32, 8,17,165 
1090 DATA75, 133, 64, 165, 65, 133, 76, 32, 8 
1100 DATA17,165,75,133,65,96 
1110 REM MODIFICATIONS FOR RELOCATION 
1120 FORI=lT03:READA:POKEOQ*256+A,QQ: 

-.NEXTI 
1130 DATA448,588,599 ' 
1140 FORI=1T03:READA:POKEQQ*256+A,QQ+1- 

-.NEXTI 
1150 DATA455,610,621 
1160 POKE876,OQ 
1170 POKE882,QQ+l 
1180 REM MODIFICTIONS FOR OLD ROMS 



March. 1981. Issue lO. 



COMPUTE! 



107 




I 



JINSAM Opens The Desk Top 

Computer Doors To 

Easy Application Data Management 



"You're in sood hands 
with the data manager 
from JINI MICRO- 
SYSTEMS, INC. JINSAM 
is a fast and extremely 
flexible data manager." 

Robert Baker 

Kilobaud 



"So far, JINSAM 
appears to do 
everything my Hawlard 
Packard data base 



does. My HP system 
cost $6000 and JINSAM 
is easier to use." 

Ed Presnal 

Marketing Manager 

Phoenix Distributing 



"We've printed over 
30,000 labels with 
JINSAM. We no longer 
have an outside 
contract. My principal 
is so pleased that he's 



given us three more 
PET'S and the Mother's 
and Father's Club 
(PTA) has donated a 
new printer with the 
money we've saved. 
We're now also using 
JINSAM for fundraising 
and accurate records 
for recruitment 
target areas." 

George Marstatt 

Mt. St. Michael's H.S. 

New York City 



JINI MICRO SYSTEMS, INC. 

Box 274 RIverdale, NY 1 0463 

DEALER INQUIRY WELCOME 



108 



COMPUTE! 



March, mi Issue lO, 



1190 
1200 
1210 
1220 
1230 
1240 
1250 
1260 
1270 
1280 

1290 
1300 

1310 
1320 

1330 
1340 
1350 

1360 

1370 
1380 
1390 

1400 

1410 

1420 

1430 

1440 



IFPEEK (5 0000) O0THEN12 20 
F0RI=1T04 :RBADA:P0KEA,2:NEXTI 
DATA908,909,913,914 

PRINT"firLOCATIONf xDESCRIPTIONf " 
PRINT" 700 STARTING ROV/" 
PRINT" 701 LAST ROVJ 
PRINT" 702 STARTING COLUMN" 
PRINT" 703 LAST COLUMN" 
PRINT" 704 FILL CHARACTER" 
PRINT" 705 ROW MOVE DIRECTION 



706 
707 



708 



PRINT" 
PRINT" 

-.SIDE" 
PRINT" 
PRINT" 

-iDIRECTION" 
PRINT" 
PRINT" 
PRINT" 

-.HOVE" 
PRINT" 

-.DELAY 
PRINT" 
PRINT" 
PRINT" 

-.OK" 
PRINT" 

-.EDGE" 
PRINT" 

-.ONLY" 
PRINT" 

-.BEFORE 
PRINT" 

-.ROUTINES" 
END 



709 

BETWEEN" 

710 



711 

EXIT" 

826 



0=UP" 

1=D0VJN OR TO ^ 

# OF ROWS TO HOVE" 
COLUMN MOVE -. 

0=LEFT" 

1=right or even" 

# op columns to -. 

# of jiffies -. 

iterations" 
wraparound factor" 
0=v;raparound is - 

1=disappear off - 

2=m0ve to edge -. 

# of iterations -. 
sys location for -. 



Listing 2 

:CLR:POKE59468,12 

1 REM MACHINE LANGUAGE GRAPHICS DEMO 

2 REM PROGRAM BY DAVID MALMBERG 

3 REM 43064 VIA MORAGA 

4 REM FREMONT, CALIF 9453 8 

5 REM (415) 651-6921 

100 QQ=53 :KY=151 : IFPEEK ( 50000 ) =0THENQQ=1 

-.35:KY=547 
110 AA=PEEK(QQ) *256 
120 IFPEEK ( 826 }<>320RPEEK(AA) 0165THENPR 

-.INT"fiMACHINE LANGUAGE NOT LOADED": 

-.END 
130 SR=700:LR=701:SC=702:LC=703:FC=704: 

-.RD=705:RM=706:CD=707:CM=70 8 
140 JD=709:WF=710:IT=711:SY=826 
150 R$="ll^^■^^^i^^^^^'^l^^^'lj'^^^■l^^^^^l^'^l^l^l^t{.^^i■": 

-.C$="»»>»»»»»9>»»»»>»»»»»»» 

-.>" 
160 X=RND(-TI) :DIMX%(8) ,A(8) ,B(8) 
170 DEF FNR(N)=INT(N*RND{1) ) 
180 FORI=0TO8:READX% (I) .-NEXTI 
190 DATA209,214,215,223,102,42,127,218, 

-.219 
200 A$=LEFTS{C$,11) :B$=LEFTS{C$,5) 
210 PRINT"fi"LEFTS(R$,6) :GOSUB6000 
215 REM BUILD BORDERS 
220 GOSUB7000:W=4 
230 FORI=0TO8:C=X%(I) 

235 IFTI-Q<60THEN235 

236 NEXTI 
240 C=32:GOSUB7100 



:GOSUB7100:Q=TI 



250 
260 
270 
280 
290 
300 
310 
320 
330 
340 
350 
360 
370 

380 

390 
400 

410 
420 

425 
430 
440 
450 

460 
470 
475 

480 



490 
495 
505 
510 

540 
550 
552 
553 
555 

560 
570 
580 
590 
600 

610 
620 
630 
640 
650 

700 
710 

720 

730 

740 



750 
760 
770 
780 



I 



REM FLASH SCREEN 

POKEFC,0:N=30:D=15:GOSUB7300 

REM MAKE REVERSE SQUARES 

C=0:FORW=1TO4:GOSUB7200:Q=T1 

IFTI-Q<30THEN290 

NEXTW 

W=4:C=32:GOSUB7100 

C=0:GOSUB7100 

N=l :D=30 :GOSUB7300 

N=l :D=3a:GOSUB73O0 

W=4:C=32:GOSUB71O0 

REM MOVE LEFT:GOSUB7O00 

POKERS , 6 : POKELR ,19: POKESC , 5 : 

-.POKELC, 35 : POKERD , : POKERH , 
POKERM,0:POKECD,1;POKECM,1:POKEIT, 

-.40:SYS{SY) 
REM MOVE DOlfN 
POK ERD , 1 : POK ERH , 1 : POK ECD , : POK ECM , : 

-.POKEIT,25:SYS(SY) 
REM MOVE UP & OFF 
POKERD, : POKECD, 1 : POKECM, 1 : POKEWF , 1 : 

-.POKEIT,20:SYS(SY) 
PRINT"fi": PRINT 
REM SHIP & R2D2 

PRINT"ii":AS=LEFTS{CS,ll) :GOSUB5O0O 
A5=LEFT$(CS,1) :PRINTLEFT$(R$,14) : 

-.GOSUB5200 
A{0)=0:A(1)=9:A(2)=11:A(3)=39 
A(5)=1:A(6)=0:A(7)=O:A(8)=1:A(4)=32 
GOSUB7000:AS=LEFT$(R$,15)+LEFT${CS, 

-9) 
POKESR, 13 : POKELR, 24 : POKESC, Q : 

-.POKELC, 13 : POKEFC, 32 : POKERD, 1 : 

-.POKERK,0 
POKECD, 1 : POKECM, 1 : DL%=6 
F0RK=1T02 

DL%=0.5*DL%:POKEJD,DL% :POKEIT,40 
FORJ=0TO8:B(J)=PEEK(700+J) :POKE700+J 

-.,A(J) :NEXTJ:SYS(SY) 
PRINTA$". . .BEEP BEEP":Q=TI 
IFTI~Q<60THEN550 
PRINTA$" 

DL%=1.5*DL%:POKEJD,DL%:POKEIT,40 
FORJ=0TO8:A(J)=PEEK(700+J) :POKE7()0+J 

-.,B(J) :NEXTJ:SYS(SY) 
PRINTA? "... SQEEEEEEK " : Q=TI 
IFTI-Q<60THEN570 
PRINTA$" " 

NEXTK 
POKE JD , ; POKERD , : POKERM ,13: 

-.POKECM , : POKECM , : POKEWF , 1 : SYS ( SY) 
A5=LEFT$(R5,2)+LEFT$(C$,9) 
PRINTA$". . .BEEP BEEP":Q=TI 
IFTI-Q<60THEN630 
PRINTA$" " 

POKERM, : POKECD , 1 : POKECM, 1 : POKEIT, 

-.40:SYS{SY) 
REM SPACE SHIP 
GOSUB7000:PRINT"fi"LEFT$(R$,19) : 

-.AS=LEFT$(C$,1B) :GOSUB5100 
PRINT"lii^>>USE NUMERIC KEYS TO -. 

-.CONTROL DIRECTION" 
PRINT"i^»»>»>PUSH j:0c when YOU WISH n 

-.TO QUIT" 
POKESR , 1 : POKELR , 5 : POKESC , 1 : POKELC , 

-.39 : POKEFC, 0: POKEIT, 9 :POKEJD, 20: 

-.SYS{SY) 
Q=TI 

IFTI-Q<180THEN760 
POKEFC, 32; SYS (SY) 
POKESR, 19: POKELR, 24: POKESC, 18: 



March, 1981. Issue lO. 



COMPUTE! 



109 



-.POKELC,22:POKEJD,0:POKERD,0: 

-.POKERM,! 
790 POKECD,1:POKECM,0:L=255 
795 REM MOVEMENT USING MATRIX VALUE OF -. 

-iKEY BEING PRESSED 
800 K=PEEK(KY) : IFK=255ORK=34THEN800 
805 IFK=LTHEN860 
810 IFK=10THEN870 

820 IFK>49THENPOKERD, : POKERM,! :GOTO840 
830 POKERD,1:POKERM,0:IFK<30THENPOKERM,1 
840 P0KECM,1:P0KECD,1: IFK=580RK=420RK=26 

-.THENPOKECD,0 
850 IFK=50ORK=18THENPOKECM,0 
860 SYSCSY) :L=K:GOTO800 
870 FORI=1TO10:GETZ$:NEXTI:REH EMPTY -. 

-.KYBD BUFFER 
880 REM ARROW GROVfS 
890 GOSUB7000:POKESR,10:POKELR,17: 

-.POKESC, 9 ; POKELR, 17 : POKEIT, 7 : 

-.P0KEJD,5 
90 POKERM, 1:P0KECM,1 
910 PRINT"H":GOSUB6200 
920 F0RK=1T05:PGKEJD,5-K:Q=TI 
925 IFTI-Q<120THEN925 
930 POKEFC,0:POKERD,1:POKECD,1:SYS(SY) : 

-.Q=TI:REM GROW 
935 IFTI-Q<60THEN935 
940 POKEFC, 32: POKEIT, 10 :POKERD,0: 

-.POKECD,0:SYS(SY) :REM SHRINK 
950 POKEIT, 10:NEXTK 
960 Q=TI:REM SHOOT OFF SCREEN 
965 IFTI-Q<120THEN965 

970 POKESR,0:POKESC,0:POKERD,1:POKECD,1 
980 POKEJD , : POKEWF , 1 : POKEIT, 26 : SYS (SY) 
1000 REM REVERSE DESIGN 
1010 GOSUB7000:POKEJD,10 
1020 PRINT"B":Q=1:K=0:GOTO1040 
1030 Q=FNR(4)+1:K=FNR(23) 
1040 FORI=KT024STEPQ 
1050 P0KESR,I:P0KELR,24-I; 

-.POKELC,39-I:SYS(SY) 
1060 IFRND(l) >.9THEN1020 
1070 GETZ$:IFZ$=""THEN1030 
1075 REM SUPER GRAPHICS 
1090 A$=LEFT5(C$,11) :B$=LEFT$(C$,5) 
1100 PRINT"fi"LEFT$(RS,6) :GOSUB6000 
1110 GOSUB7000: POKEJD, 20 
1120 C=0:FORW=1TO4:GOSUB7290:Q=TI 
1130 IFTI-Q<30THEN1130 
1140 NEXTW 
1145 FORI=1TO10:GETZ$:NEXTI:REM EMPTY 

-iKYBD BUFFER 
1150 END 
5000 PRINTA?" 
5010 PRINTA$" 
5020 PRINTA$" 
5030 PRINTA$" 
5040 PR1NTA$" 
5050 PRINTAS" 
5060 PRINTA$" 

-.r>r M$$$$ 
5070 PRINTA$" 

-■■.r ""(aP 
5080 PRINTA$" li 

"' j- 
5090 PRINTA?" '_ 

5095 RETURN 
5100 PRINTA$" 12 
5110 PRINTA$" xJ_ 



:POKESC,I; 
:NEXTI 



1 




-L" 




1 




1 n 




1 




'%" 




.r<rl 




l£ II 


i f 3 


*r 


r 


'%" 


X> rs 


Sll 


r 


-1 



gp""r 



. r 






PET' MACHINE LANGUAGE GUIDE 




Ctintents include- sections on: 
•ifiput and uiitpift routines. 

• I ixcd point, flrjJTing puiot, 
i^rid Ascii niirntJL'r cfinvcrsion . 

• Clocks and timers. 
*IJijiM-in arithnictiL lunclions. 

• I'f <j9rarnniiiig liiriK and Sugqes- 
tions. 

• Mdny sample prog^nii. 

While supply lasls: 

Guides for Old ROMS 

only S6.00 inc postage 

New ROMS order below 



If vou are interested in or are afreiidy into machine fanguage 
programming on the PET. then this invaluable guide is for 
you. More than 30 of the PET's built in routines are fully 
detailed so thai the reader can immediately put them to good 
use. 

Available (or $6.95 ^ .75 postage. Michigan residents please 
include 4% state sales tax. VISA and Mastercharge cards 
accepted ■ give card number and expifalion date. Quantity 
discounts are available. 



llttl»**?Tl 

iiiiin;!! 



ABACUS SOFTWARE 

P. O. Box 721] 

Grand Ranids, Michicjan 



49510 



m^ = iRoiu/setiifiifl PET Products 
from 
OPTIMIZED DATA SVSTEMSl 

-SOFTWARE FOR ALL PET/CBMs- 
(Supplied on Cassette— Prices include Shipping) 

• WORD PROCESSOR {PS-0011 S16.95 

Makes documents a imp 

• MAILING LIST (PS-0021 S16.95 

Throw dway v^ur address book 

• SPACE EATER (PS003I S9.9S 

GohUlE! spaces in BASIC programj 

• CATALOG IPS^)04( $16.95 

File stamp/coin/etc. colleotiors 

• SATELLITE TRACKER (PS005I $24.95 

Tracks OSCAR Ham Saielliie in real <ime 

MORSE CODE KEYER (PS0061 S14.95 

Sends code on the air or for practice 
MINI-COUNT^ " )PS-Q071 S19.95 

Measures frequency to 17KHz and intervals la 6S msec 

-HARDWARE FOR "OLD" 8K PETS- 

IShipping Additional) 

21U RAM ADAPTER I* SI .60 per oriiBr) 

Replaces up to 8.6550s with low cost, reliable 21 t4s 



/. 



PHB-001 {Bare PCBl . . . .S8.95 PHK^JOl (Kit-2 sockets) S13.95 

PH-OOIS (Assm-EOCkets PHK-001S (Kit-8 sockets) . . .S16.25 

only! S22.95 

PmjOl (Assm-2 sockets tone 2114) SZ4.B5 

I 4K MEMORY EXPANSION (+ S3 per order! 



Installs easily internally. Utes 2114s. Wnte Protect. 

31 G 

642 



PHB-Qa2 (Bare PCBl . . 

Pm)02S (Assm-sockets 

only) 



PHK.002(Kit.socketsonly) S29 

PH.002 (Full Assm) S105 



PROMPT SHIPMENT! 
Calif. Residents, add 6% Tax 

P.O. Box 595, Dept. C 



SATISFACTION GUARANTEED 

Placentia, California 92670 



MlWhCOUr^T Tra<ltmark of Oprjffliied Data Svstams 
PET/CBM Trademark of Commodore Busineu Machines 



no 



COMPUTE! 



March, 19S1 Issue ]0. 



5120 
5130 
5140 
5150 
5200 
5210 
5220 
5230 
5240 
5250 
5260 
5270 
5280 
5290 
5300 
5310 
6000 

6010 

6020 

6030 

6040 

6050 

6060 
6082 
6084 
6092 
6094 

6102 

6104 

6112 
6114 
6122 
6124 

6132 

6134 
6140 
6200 
6210 
6220 
6230 
6240 
6250 
6260 
6270 
6280 
6290 
6300 
6310 
6320 
6330 
6340 
6350 
6360 
6370 
6380 
7000 
7010 
7100 

7110 
7120 



PRINTA$" Lit" 
PRINTA?"xJ-USAlr" 
PRINTA$" Nr) "" gM" 
RETURN 
PRINTA$"» r)0; r)M" 



PRINTA$"»x Iri 
PRINTA$"»JL<rl 
PRINTA$"»i ni 
PRINTA$">Ji 1 1 



n" 

M" 
M" 

M" 

m" 



PRINTA$"»» H ] 1 

PRINTA$"»»»M1 ] 

PRINTA$"»>»11 

PRINTA$">>»11 

PRINTA$"»»>» 1 IMNNHH " 

PRINTA$ "»»» r) ( r r» r) ( f " 

RETURN 

PRINTA$" r1 ' r r f £ r x If X f 

-r Ir " 
PRlNTA$"x fxfxrjLfxfxfx 

-.f X f X r" 

f X f X f 



rl r 



.r X r X r r r 



r r 



X r r 
: fl X 



r X r 



X r 



r X -■ 



PRINTA?": 

-.X fi" 
PRINTA$" 

-X If" 
PRINTA$"x f X 

-■ X r r r 
PR I NT A 5 "Ix fl 

-ir X r 
PRINT 

PRINTS? "xl If X If Xl If X If"; 
PRINT" X f X f X f xi If Xi If" 
PRINTS? "x fxfxfxfxfxf"; 
PRINT" xfxfxfxf 

A >. A ■■ 

-ir X r X r 
PRINTS $"x f r fl X f 
PRINT" X fl X f X f 

-nixlf" 

PRINTB?"x 1 f X If X 



X r X r X 

■*■ II 

X r " ? 

X f 



PRINT" 



r X C 



xrxr xr xr 



PRINTS? 


»l A A A A. 

X r X r X r_t 


If X 


r X r"; 


PRINT" 


X r xrxr 


X r 


xrxr 


-■X r X 


f" 






PRINTS? 


11 A A A A 

_x r X r X r 


X r 


X r X r"; 


PRINT" 


X r X r X 


r _x 


fl Ix fl" 


RETURN 








PRINT" 


■\" 






PRINT" 


'■\" 






PRINT" 


I 1 1 \ n 






PRINT"SSSNrn%%" 






PRINT"\SSM M%%" 






PRINT" 


\S#M H%" 






PRINT" 


\##M M" 






PRINT" 


###H M" 






PRINT" 


M n" 







ELM X If " 
M. Hr 
Mr) 



PRINT" H M " 

PRINT" H H " 

PRINT" M, n 

PRINT" 

PRINT" 

PRINT" 

PRINT" 

PRINT" Ix 

PRINT" li 

RETURN 

REM SUS TO ZERO PARAMETERS 

FORH=0TO11:POKE700+M,0:NEXTM: RETURN 

REM SUB TO BUILD A BORDER W WIDE -■ 

".WITH CHARACTER C 
POKEFC , C : POKESR, : POKELR, 24 
POKESC , 40-W; POKELC ,.W-1 : SYS ( SY) 



f" 
f" 
f" 
f" 



7130 POKESC, 0: POKELC, 39 

7140 POKESR, 25-W:POKELR,W-l:SYS(SY) : 

-.RETURN 
7200 REM SUB TO FILL AN AREA WITHIN A -. 

-iBORDER W WIDE WITH CHARACTER C 
7210 REM IF C=0 THEN REVERSE AREA . . IF -. 

-.0=32 THEN BLANK AREA 
7220 POKEFC, CiP0KESR,W: POKELR, 24-W 
7230 POKESC,W:POKELC,39-W:SYS(SY) :RETURN 
7300 REM SUB TO REVERSE SCREEN N TIMES ^ 

-.WITH D JIFFY DELAY BETWEEN -. 

-.ITERATIONS 
7310 POKEJD,D:POKEIT,N: POKESR, 0: 

-.POKELR, 24 
7320 POKESC, 0:POKELC, 39:SYS(SY) :RETURN ' 




For the Commodare PET/CEHVI 

With one notary switch select 1 to B 
separate ROMS or EPRDMS. with- 
out damaging your computer board 
or rom pins. Now you can use Word- 
pro, Toolkit, ViBicalc, Eprom« as 
STT B's OP SB3S's etc. 

Assembled SBO post paid. 
Kit S45.00 post paid. 

Coming in Marcl^! 

A switch between old basic 2.D and 
new 4.0 basic RDMS. Now you can 
utilize your computer with new and 
old software. [Write for details]. 

MR J 7351 No. 4 Rd., Richmond, B.C., 

Canada, V6Y 2T4 

Telephone [60-4) 273-3651 



March. 1981. Issue lO. 



COMPUTE! 



Ill 



ECX 

COMPUTER 

CO. 

Specialists 

In Commodore 

PET Equipment, 

Peripherals 

And Software. 

' All Commodore Business Machines Co. Products 

• ClOl: Centronics/NEC to lEEE-488 (PET) 

Interface $225.00 

• C102: Watanabe Digiplot to IEEE-488 (PET) 
Interface .$295.00 

• C232: IEEE-488 (PET) To RS-232C Bi- Directional Inter- 
face $ Call 

• X232: PET To RS232C Bi-Directional Interface $ Call 

• Watanabe "Digiplot" Intelligent Graphics 

Plotter $1200.00 

• Curve: Graphics Software Package For The Digiplot 
And Pet $295.00 

• SX-100: IEEE-488 Modem Software (For Commodore 
Model 8010) $ 35.00 

• MX-200: Custom Parity IEEE-488 Modem With SX-200 
Software $449.95 

• PET Computer System Desk, Walnut or Oak . . . $395.00 

• NEC Spinwriter Printer Stand: Matches Desk Noted 
Above • $275.00 

We Offer Fast And Efficient Service On 
All Commodore Business Machines 
Equipment! 

Send it to us and you will have it back 

usually within a week! 

ECX Computer Co. is owned and operated 

by Com-Plications Inc., a design and 

development corporation specializing in 

IEEE-488 (PET) peripherals and software. 

Call Us: We Talk Technicall 

All Com-Plications Inc. peripherals are 

manufactured to industrial quality standards. 

If you want to know more about the IEEE-488 
Bus, read our new book, published by Osborne/ 
McGraw-Hill, "The Pet And The IEEE-488 (GPIB) 
Bus", Authored by the president of Com-Plications 
Inc. and available from us for $20.00 (includes tax and 
shipping). 

P.S. All of our IEEE-488 interfaces meet "all" the 
specifications of IEEE-488; 

ECX COMPUTER COMPANY 

2678 North Main Street #6 

Walnut Creek, CA. 94596 

(415) 944-9277 



HARD WORKING SOFTWARE 

for PET/CBM operating systems 1.0 to 3.0 

TM 

MATRIC expands Commodore BASIC with fourteen new 
commands for handling arrays. Algebraic style syntax. 
Checks for conformability, Extended error messages. 

The 5K machine language program lets you ■■ Display a 
matrix on the screen and change its values. Transfer data 
between matrices or fill a matrix with a constant. Transpose. 
Transfer diagonals tjetween matrices, or from a matrix to a 
vector, from a vector to a matrix, or fill a diagonal with a con- 
stant. Do vector or matrix addition, subtraction, multiplica- 
tion; elementwise multiplication, division, squares, and 
square roots. Inversion. Determinant. Eigenvalues and 
eigenvectors of a square, symmetric matrix. 

Specify size and ROf\/l set of your machine. Tape or disl<, 
32-page manual. Price: S125. 

TM 

PRO-GRESS multiple regression BASIC program reads 
unlimited records from tapes or CBf^ disk. Up to 45 variables 
in 32K. Permits transformations. Provides means, standard 
deviations, correlations: R, R-square, F, degrees of freedom; 
constant and coefficients, betas. Student's fs. Output to 
screen, or to ASCII or CBM printer. 

[Manual and tv^^o programs. Tape: $45. Disk: S50. 

TM 

TEXTCAST II 8K machine language word processor. Easy 

typing and screen editing. Produces ASCII files on tapes or 

disks. Prints with ASCII or CBM printer. Centers, underlines, 

right justifies, numbers pages. Creates data files for 

PRO-GRESS. 

Old/New ROlvl versions of program, revised manual. Tape: 

S75. Disk: $80. 

ORDER YOUR WORKERWABE FROM: -, 

Cognitive Products 

P.O. Box 2592 

Chapel Hill. NC 27514 



Computer House Division 

PROGRAMS FOR COMMODORE AND APPLE 

Legal accounting Demo $15.00 

Legal accounting Program 995.00 

fvlachine Part Quote Demo 15-00 

Machine Part Quote Program 325.00 

Mailing/phone list 80.00 

Political Mail/phone list 130.00 

Beams, structural 115.00 

Trig/Circle Tangent 110.00 

Spur Gears 35.00 

Bolt Circles 25.00 

Filament Wound TAnks 125.00 

Scrunch 25.00 



PROGRAMS FOR COMMODORE ONLY 




A/P,A/R, Job Cost & Job Est. 


370.00 


Inventory 


95.00 


Financial 


175.00 


Real Estate Listings 


265.00 


Check Writer 


25.00 


File Editing Tools{FET) 


65.00 


Screen Dump/Repeat 


35.00 


Docu-Print 


20.00 


Scrunch 


25.00 


Sof-Bkup 


40.00 


Sorter (Mach. Language) 


35.00 


Trace-Print 


25,00 


Varl-Prlnt 


25.00 



ASK FOR CATALOG #80-C2 Dealers Wanted 
Computer House Div. 1407 Clinton Road 
Jackson, Michigan 49202 (517) 782-2132 



112 



COMPUTE! 



March. 19H1. Issue lO. 



Disk File 

Recovery 

Program 

David L, Cone, Sunnyvale, CA 

Have you ever been working happily along on a pro- 
gram, updating it periodically on your disk, only 
suddenly to discover that something wierd has hap- 
pened and you've apparently lost half of the pro- 
grams on the disk. (I've even had the case where the 
programs disappeared from the directory while the 
number of blocks remaining stayed the same). 
Maybe what happened was that AFTER you 
scratched the program from the disk you found that 
the PET had also gobbled up your program in 
memory — (or you did). Or perhaps you had done a 
short 'new' of a disk only then to realize that valued 
programs were on it! 

If you've ever been in this frustrating position of 
knowing your program was just sitting there on the 
disk with no easy way to get it back, this DISK 
FILE RECOVERY program will help — it will 
recover such programs. As long as you can still in- 
itiate the disk and have not written a new program 
over the file you want, you can recover it. It cannot 
recover programs from a disk which will not initiate 
or upon which a long 'new' (ie. a 'new' with a disk 
number) has been performed. 

The disk works this way: When a file is placed 
on a disk, part of the information placed in the direc- 
tory on track 18 is a pair of pointers giving the track 
and sector numbers of the block where the file 
begins. The first two bytes of this block are also 
pointers giving the next track and sector numbers. 
This process continues until the last block is reached. 
For the last block, a 00 is placed in the first byte and 
nothing appears to be done to the second. Files are 
stored in a somewhat alternating way below and 
above track 18. The first file is stored starting at 17,0 
(track 17, sector 0). When track 17 is filled, the next 
new file appears to be started at 19,0 and so on back 
and forth. If you have lost or destroyed track 18, the 
problem is then how to find and identify the initial 
blocks of the lost files and then to recover the files. 

This is what the RECOVERY program does! 
First, it gives you the choice of working with either 
the lower band (tracks 17 to 1) or upper band (tracks 
19 to 35), and on which track you wish to stop. It 
sets up an integer array [D%(35,20,3)] which can 
receive for each block the "in" pointers (ie. the track 
and sector numbers of the block which 'points' at it) 
and the "out" pointers (ie. the track and sector 



number of the block at which it points. The program 
then scans the first track for these pointers. What we 
are looking for are blocks which have no "in" 
pointers, for they must be the ones pointed at by the 
directory and thus the initial blocks for any files. 
Next the program takes each initial block and follows 
that file through all its blocks to the end, filling in 
the array as it goes. Each subsequent track is simi- 
larly scanned and as new files are found they are 
traced. You have the option of stopping this process 
at any point. Meantime, the program has kept track 
of the start and end of each file and the number of 
blocks it uses. This summary is presented on the 
screen. 

The next major problem is the identifying which 
file is which (since only the disk knows where a file 
was saved and on which half of the disk). The pro- 
gram offers you a number of appropriate options at 
this point, and the most useful one for file identifica- 
tion is labeled LOOK. LOOK pulls the initial block 
of any file out and extracts information that will pro- 
bably allow you to identify the file. First, it displays 
in a useful form the first four pairs of bytes. The first 
pair are the pointers to the next block. If the file is a 
program the next pair of bytes tell where the pi^o- 
gram is to be loaded in memory. For Basic pro- 
grams, this is usually 1024. The third and fourth 
pairs of bytes are from the program itself. The>' are 
the link and line number of the first instruction in 
the basic program. If the file is a machine language 
program or a sequential file, then you get wcirti and 
meaningless values for the link and line numbers. 
Next, LOOK gives you the first 48 bytes of the pro- 
gram in hexadecimal form (as if they were being ex- 
amined by the machine language monitor). Finally, 
LOOK gives you a printed "translation" of the first 
240 bytes. Basic commands are tokenized and appear 
as reversed characters or symbols. The link and line 
pointers also can look quite strange. However, 
numbers, variables, anything between quotes, and 
REM statements all appear as usual. Thus, if you 
have some convenient identifications at the beginning 
of your program, you will be able to recognize ihem. 
To see how this "translation" takes place, see lines 
1360-1390 and 5090-5095. Eighty characters are 
scanned at one time and you can go from one set of 
eighty to another. With this amount of information it 
is usually quite easy to determine what any file is 
and if you wish to recover it. 

Aside from LOOK, you have the following op- 
tions: 1) SUMMARY REVIEW — this gives you 
the start block of any file and the number of blocks 
in that file. You need to know the start block to 
either look at or recover a file. Also, the number of 
blocks in the file may aid in its identification. 2) 
RETRIEVE A FILE — here is the point of all of 
this; now you get the program or file backl The pro- 
gram asks for all the essential things: starting track 
and sector, the name you want for the recovered file 



March. 1981. Issue lO, 



COMPUTE! 



113 



McTerm 




.DISON 
OMPUTER 



A Telecommunication Package 



With the McTerm package your Commodore computer can now become a very intelligent 
terminal. It allows you to easily participate in the electronic mail revolution. McTerm can 
communicate simultaneously with another PET or mainframe. You can transfer entire disk files 
to other disk drives; send or receive program, WordPro, sequential, or relative files. This 
package works on Commodore computers with 3.0 or 4.0 Basic, 1 .0 or 2.0 DOS, 40 or 80 column 
computers, and 2040 or 8050 disk drives (requires the use of TTL Level RS-232 modems). 

Complete with Program, ROM, Cable and Manual. 
Price: $195.00 

^'^^^^^V Features include: . 



-r--- -Baud selection from 75 to 1200. 

-Full and half duplex, also local echo. 
-f:-:-, -Supports odd, even and mark parity. . ., 

k -CRC, errorchecking for PETto PET files. 1 

1825 MONROE STREET, MADISON, Wl 53711 (608)255-5552 
-Dealer Inquiries Are Welcome- 




Big power 
small package. 




mCHINE LflNGURGE UTILITV-PflC 1.2R 

ROM BHSEE FIRMWARE INCLUDES 43 COMMRNDS TO 
ENHRNCE USE OF VOUR COMPUTER INCLUDING DOS! 
INCLUDES ASSEMBLER, DISSRSSEMBLER, HUNT MEMORY. 
QUICK TRACE, COMPARE MEMORV> TRANSFER MEMORV. 
RELOCflTOR. URLK CODE, INTEGRATE MEMORV, VIDEO 
SCREEN DUMP TO PRINTER IN STRNEARL OR ENHANCED 
FORM, FILL MEMORV, FfiST TYPE CODE ENTRY, HEX TO 
DECIMAL AND ASCII CONVERSIONS & VISE VERSA! 
MOST FUNCTIONS TO SCREEN OR PRINTER. MAKES 
HANDLING AND UKDERSTflNDIHO OF MACHINE CODE 
PROGRAMMING EASIER. ALSO INCLUDED ARE THESE 
PROGRAMS ACCESSIBLE FROM BASIC. REV. PRINT - 
DOS - SCREEN DUMP - ENHANCED SCREEN DUMP - 
RE/NEW - flUTO REPEAT - DISK APPEND - REV. SCREEN 
- DISPLAY. AVAILABLE FOR 3.0 ROMS AT LOCATION 
HEX $fl000, FOR 4.0 ROMS AT HEX $9000 OR HEX 
*R000. SPECIFY. MRNURL INCLUDED. WE ACCEPT VISA 
AND MASTER-CHARGE. ORDER FOR 36 DRY FREE TRIAL. 
DOES NOT LOWER USER MEMORY. A MUST FOR NEW OR 
RDVANCED PROGRAMMERS ALIKE! 

4K ROM FOR 3.0 afleeO) *79.95 + *2 S&H 

4K ROM FOR 4,0 ($A000)OR<*3000>. .*79. 95 + $2 S&H 



BASIC UTILITIES 4.0 

THIS 4K ROM CONTAINS 19 COMMANDS FOR BASIC 
PROGRAMMING. INCLUDED ARE AUTO - RENUMBER - 
DELETE - FIND - APPEND (TAPE) - DUMP - HELP - 
TRACE - STEP - OFF - REV. PRINT - D.0.3. - 
SCREEN DUMP - ENHANCED SCREEN DUMP - RE/NEW - 
AUTO REPEAT - APPEND (DISK) - REV. SCREEN - 
DISPLRY. MANUAL INCLUDED. THIS ROM IS LOCATED 
AT HEX *9000. THESE PROGRAMS DO NOT LOWER USER 
nVRILRBLE MEMORY, & WILL GREATLY ENHRNCE YOUR 
PROGRAMMING AEILITVi 

4K ROM IS .....*79.95 + *£ S&H 

2K ROM W/FIRST 10 COMMANDS IS $39.95 + *2 S&H 

PLEASE SPECIFY WHICH ROM SET YOU HAVE, 



SEND Si, 00, 
GET CATALOG 
& $5.00 OFF 
OF THE NEXT 
PURCHASE! ! ! 



COMPETITIVE 

SOFTWARE 

21650 Maple Glen Drive 
Edwardsburg, MI 49112 



114 



COMPUTE! 



MofCh, 1081. Issue lO 



and whether it is a program or a data file. It gives 
one final chance to abort unless everything is ok and 
then it is off and running. 3) SCAN OTHER 
BAND, 4) DIFFERENT DISK, and 5) EXIT PRO- 
GRAM are all obvious. 

The program itself, while complex in details, is 
straightforward in construction. It is divided into the 
following sections: 

400- 492 Program description and credits 

500- 595 Description of all variables 

600- 696 Start of Program — Initial choices 

700- 865 Search for initiator blocks 
1000-1055 Print summary tabic 
1100-1165 Choices 
1200-1415 Performs LOOK option 
1500-1655 Retrieves the file 
4000-4076 General subroutines 
5000-5109 Disk operation subroutines 

"REM**" statements are used to show major divi- 
sions of the program while "REM @" indicates 
descriptive statements within these major divisions. I 
have used REM statements fairly liberally and these 
should help in tracing through the details of the pro- 
gram. A pair of REM statements (line numbers 1410 
and 4003) need a special comment: if you have a 
machine language screen dump capability, you 
should SYS to them here. I use a shifted "P" to ac- 
tivate the screen dump. 

A couple of final comments: If you search tracks 
in which there are no programs, you may get a disk 
read error (22 READ ERROR 13,0). If this occurs, 
simply type GOTO 1000 and you will be able to go 
on without any problems. I hope this program is as 
useful to you as it has been to me. I made it because 
I really needed it. You may not need it often, but 
when you do, the situation is likely to be desperate! 



r-iijTn!=; 
SEC I 

I 

1 I 

2 i 



4 

5 
6 



y 

10 

11 

12 
13 
14 
15 
lb 
17 
13 
19 



TRaCK 
TR IH 



19 
19 
19 
19 
19 
19 
y 

19 
19 
19 
19 
19 
19 
13 
19 



19 
19 





19 

:=:C 


10 

11 

12 
13 

14 

15 

ti 

17 

IS 


1 



TVF'E RHV KEV 
Figure 1. Track 19 Summa 
A summary tabic such as this 



ir-iriRRY TRELE 

TR OUT SC 

19 10 

19 11 

19 12 

19 13 

19 14 

19 15 

64 220 

19 17 

19 IS 

64 214 

19 1 

19 2 

19 3 

19 4 

19 5 

19 ■ 6 

64 130 

19 S 

19 9 

20 8 
TO CONTIHUE 

y Table 
s made for each track scan- 



G0Tn5 

RECOVEREIi DISK SEQUENCES 
SEQUENCE 1 

TRRCK SECTOR 

STfiRT 1 7 

PRESENT FLOCK 11 17 12 

END 17 12 

NUMBER OF BLOCKS 11 



CC-CONT P-PRUSE H-HflLT S-SUflNRRV) 
TVPE RNV |;;EV to COhlTINUE 

Figure 2. Recovered Disk Sequence 

As each file is traced, this table keeps track of what is hap- 
pening and summarizes the results. 



UUTO^ 



FIRST PRGE DRTR 



INITIfiL BLOCK 

BLOCK POINTER 

PRGFiM STfiRT 
1ST LINK 
1ST LINE « 
HEK VRLUES 

00 

08 

10 



TRRCK 
17 
BYTES 
0-fcl 17 10 
DECIMhL VALUE 
2*3 1025 
4A5 1032 
6'5::7 



ECTOR 




IS 
20 



11 0fl 01 y4 0S 04 00 00 

89 35 00 21 04 01 00 99 

22 93 11 11 11 3E 49 31 

911 911 911 n 3E 24 31 13 

22 3R 80 00 3B 04 02 00 

99 22 92 3E 53 30 3R 43 



CHRRRCTER VRLUE-S : 

Q jRiiHriiierse ! riRe«" -\ G!qq> n -j -■ j q;>$ i :e: " : \y=i\in'h 

-"H>S0 : COPV B1SK.+ " ■■ -">"e$riCi5-"i3S't'" I <34>" 
■-C' TO CONTINUE •■ +/- CHANGE LINE :£:CRN 

Figure 3. First Page Data Program File 
A typical BASIC program looks this way. Note the follow- 
ing: PRGRM START = 1025; typical 1st LINK and LINE 
# values; and identifiable features in the CHARACTER 
VALUES. (Unfortunately, my dump program docs not 
give reversed characters which would assist in identifyine 
BASIC tokens). 



ned. The zeros in the IN column indicate the initial block 
of a file. The 64 in the OUT column shows where a file ends 



March, 1981. Issue lO. 



COMPUTE! 



115 



DR. DALEY'S BEST Mailing List Is Now Better! 



DR. DALEY has taken his best selling mailing list and made it even better! This version has 
been totally revised to increase the reliability of the files and make it even easier to operate. 
Several new features have been added: 



• Goof-proof input routine. Ehminates the irritating results of accidentally pressing 
some cursor control keys. This is a machine code routine so it is as fast as you are! 
BONUS— Auto repeat on all keys! 

• Interface to allow output of the entire maiHng list or virtually v4A^y subset to WORD- 
PRO III and WORDPRO IV format files so you can use these to generate personal- 
ized form letters. YOV cz.r\ format the structure of this output! 

• Routines to merge files and to minimize the number of duplicate entries in a file. 

• More machine code routines to speed up processing. 

• In addition you have the same powerful file formatting options where YOU can 
determine the structure of the files. YOU cdin format your label output with up to 11 
lines per label and from 1 to 8 (yes EIGHT) labels per line. 



This system is completely menu driven, It includes 100 pages of user documentation. This 
documentation is for the end user and is not padded with listings, flow charts, and other such 
extraneous material. 

This program will be available for a short time at the introductory price of $159.95, It is 
available for the 32K PET and CBM 3000, 4000 and 8000 series computers. You can order 
through your dealer or directly from us. We will accept VISA or MASTERCARD or your check 
or money order. Overseas orders include 10% to cover shipping. 



Charge to 
your 

MC/VISA 




VISA 



DR. DALEY'S Software 

425 Grove Avenue, Berrien Springs, MI 49103 

Phone (616) 471-5514 

Sunday - Thursday noon to 9 p.m.. Eastern Time 



116 



COMPUTE! 



March. 981. Issue lO. 



G0T05 



FIRST PFlGE BRTF! 









TRACK 


SECTOR 


INITIAL BLOCK 




20 









EVTE: 






BLOCK 


POINTER 


Ml 


20 
riECIHRL '■ 


10 

■'RLUE 


Pf=:GRM 


STRRT 


2A3 


2867; 


V 


1ST LINK 


4&5 


1954 




1ST LINE # 


e&7 


9143 




HEK VALUES 








00 


14 0fl 


60 70 


R2 07 ED 


23 


0S 


70 95 


7g C:ft 


ri0 f;e: R2 


0fl 


10 


SE E2 


M3 h2 


00 SE E3 


03 


IS 


P.f. f::-: 


86 7l: 


86 81 CR 


£16 


20 


BC fl2 


64 86 


82 86 80 


60 


28 


4C D0 


72 00 


4C F8 72 


20 



CHhRRCTER 'v'RLUES : 

T,J§0«G-'#0l 8 •^-rmJ-it£:.^'^~>~CM-^MCm '^ ■( 
L~E:@L~2 0@ r. HJ 3 IH ^Q« ^"Q < rC-,. tCLC-- 

-C-' TO CONTINUE: +/- CHRHGE LINE SCAN 

Figure 4. First Page Data Machine Language 

Program 
This program was put into high memory starting at 28672. 
Note the rather random CHARACTER VALUES, and 
FIRST LINK and LINE values. 



G0T05 



FIRST PAGE riRTfi 





TRACK SECTOR 


INITIAL BLOCK 


1? 1 




BVTES 


BLOCK POINTER 


0*1 17 11 




DECIMAL VALUE 


PRGRM START 


2S3 21062 


1ST LINK 


4*5 20805 


iST LINE # 


6*7 17749 



HEK VALUES 

00 : 11 0B 46 52 45 51 55 45 

yy : 4E 43 59 20 42 59 20 52 

10 '■ 52 0D 20 37 30 20 OD 20 

18 - 38 20 0D 20 38 26 0D 46 

20 : 52 45 51 0D 20 37 20 0D 

28 : 52 52 0D 20 32 20 OD 53 

CHARACTER VALUES : 

QKFREQUEHCV EV RRM 70 N 8 M 3 NFREPM 7 M 
RRN 2 MSVCEt'l 5 MCMrJTSM 24 MUSRGEM 1 NSIG 

-'C-' TO CONTINUE: +/- CHANGE LINE SCAN 

Figure 5. First Page Data Sequential Data File 
The easiest way to identify this type of file is to observe 
the data items separated by "M" in the CHARACTER 
VALUES section. The "M" is the screen representation of 
CHRS(13) and is in reverse field on the screen. 



G0TO5 

SEQ # 
1 



FILE SUMMARV 



BLOCKS 

11 
13 
3 
7 

40 
1 



START 


FINISH 


TR SEC: 


TR 


SEC 


17 


17 


12 


17 1 


16 


5 


1 6 y 


16 


20 


16 1 


16 


4 


1 6 6 


14 


20 


14 2 


14 


■-• 


14 12 


14 


4 


14 14 


13 


7 



TVPE ANV KEV TO CONTINUE 
Figure 6, File Summary 

This table summarizes the completed scan results. Ttie 
START track and sector numbers are needed to use the 
LOOK and RETRIEVE options. 



RECOVERED 


DI 


SK SEQUENC 


:ES 


SEQUENC 


E 3 








TRACiK 


SECTOR 


START 




14 


14 


PRESENT liLOCK S 




13 


7 


END 




13 


7 


NUMBER OF BLOCKS 




8 





::C-cnHT P-PAUSE H-HRLT 



?ijmmarv:j 



rUSK ERROR AT PROGRAM LINE 5021 

ERROR MESSAGE: 22 READ ERROR 13 .. O 

READV. 

Figure 7. Recovered Disk Sequence 

This is what you may see if you try to recover files from a 

part of the disk where no files have been written. Simply 

type GOTO 1000 to continue. 



GOTO400 

5 PRINT"RUN":LIST500-525 

10 INPDT"SAVE ON DRIVE # " ; A: AS= "DISK -, 

-.FILE RCVRY" : IFAO0ANDAO1GOTO10 

11 B$=STR$(A)+":"+A$:OPEN15,8,15, "S"+B$: 

-.CL0SEI5:PRINTA$" SCRATCHED 

12 SAVEB$,8:VERIFYB$,8:PRINTA$" SAVED -. 

-.AND VERIFIED": END 
400 REM ****************************** 
* 

DISK FILE RETRIEVER 



4 01 REM 
402 REM * 
4 03 REM * 

404 REM * 

405 REM * 

425 REM ***************************■>** 
427 REM * PUT DISK VJITH LOST FILES 



BY DAVID CONE 



March, 1981. Issue lO. 



COMPUTE! 



117 



429 

431 

433 

435 

437 

439 

441 

443 

445 

447 

450 

452 

454 

456 

458 

470 

472 

474 

476 

478 

480 

482 

484 

486 

488 

490 

492 

500 

501 

502 

503 

504 

505 

506 

507 

508 

509 

510 

511 

512 

513 

514 

515 

516 

517 

5 24 

530 

531 

532 

533 

534 

535 

536 

537 

538 

539 

540 

575 

576 

577 

578 

579 

580 

581 

582 

583 

5 84 

585 



REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 
REM 



INTO DRIVE 
WILL THEN S 
IN TRACKS 1 
RETURN THE 
BLOCK, AND 
THE FIRST 2 
FILE MAY BE 
ALLOW IDENT 
ANY IDENTIF 
COPIED ONTO 



1. THIS PROGRAM 

EARCH FOR FILES 

7-1 & 19-35 AND 

START BLOCK, END 

NUMBER OF BLOCKS. 

56 BYTES OF ANY 

EXAMINED TO 

IFACATION. 

lED FILE CAN BE 

DRIVE 0. 
**************************** 

USAGE: DRIVES: 

DRIVE 0: GOOD DISK 

DRIVE 1: DAMAGED DISK 
LOGICAL FILES: 

1: WRITE FROM KEYBOARD 

8: READ FROM DISK 

9: WRITE TO DISK 
15: DISK CONTROL 
DISK CHANNEL: 2 
DISK BUFFER: #2 (1900-19FF) 



REM ****************************** 



REM 
REM 
REM 
REM 
REM 



* PROGRAM ENTRY POINTS 

* 10 - SAVE & VERIFY PRGM 

* 1000 - PRINT SUMMARY TABLE 

* 1100 - CHOICES 



REM ** NUMERICAL VARIABLES 

P{0)=0:REM PRESENT TRACK tt 

P(1)=0:REM PRESENT SECTOR # 

L(0)=0:REM TRACK LINK 

L(1)=0:REM SECTOR LINK 

SR=17: REM START TRACK (17 OR 19) 

SP=00: REM END TRACK 

SM=20: REM MAX S OF SCTRS IN TRACK 

TR=SR: REM VARIABLE TRACK VALUE 

:M=01: REM SEQUENCE # 

MM=50: REM MAX # OF SEQUENCES 

:N=00: REM # OF BLOCKS IN SEO 

PS=00: REM START OF BASIC 

PL=00: REM 1ST LINK POINTER 

PN=00: REM 1ST LINE # 

ES=00: REM ERROR IN SECTOR 

ET=00: REM ERROR IN TRACK 

EL=00: REM DISK ERROR IN LINE t 

: : REM A,J,K GENERAL VARBLS 

REM ** 

REM ** STRING VARIABLES 

: :REM A$,Z$ GENERAL VARIABLES 

B$="" :REM CONT RUN VARIABLE 

F$="" :REM NEW FILE NAME 

T$="" :REM TYPE OF FILE CREATED 

EN?="00" :REM DISK ERROR # 

BM$=" OK":REM DISK ERROR MESSAGE 

S5=" ^^4" :REM STRING UTILITY 

H$="0123456789ABCDEP":REM HEX DGTS 

ZG$="fiG0T05":REM STRING UTILITY 

REM ** 

REM ** MATRIX VARIABLES 

DIMD%{35,20,3) :REM BLOCK POINTERS 

: REM " ' 0,1 IN TRK & BLK PNTRS 

: REM " ~ 2,30UT TRK & BLK PNTRS 

: REM " 20-BLOCK NUMBER 

: REM 35- - -TRACK NUMBER 

DIMS%(MM,4) :REM SEQUENCE DATA 

: REM 0,1 START TRACK & BLOCK 

; REM 2 NUMBER OF BLOCKS 

• REM 3,4 END TRACK & BLOCK 



Programs for Commodore's PET® 

Present this od from COMPUTE! and receive J2 off your purchose 
price. Valid ot your loco! dealer or when ordered direct. 

• PROFESSIONAL TOOLS 

• Business Researcher (16k) S50 

• [\NAV3 Novigoior (16k) i30 (6k) i25 

• Educotion Pack (High School) S15 

• DISK BOWLING SYSTEM 

• Leaguebowl-24 (Disk 32k) S145 

• Archivebowl (for above) $40 

• LeaguebowM2 (Coss. 16k) S40 

• Tournamentbowl (Coss. 8k) $30 

• HOME & OFFICE 

• Deluxe Address ('t6k)$40 

• Home Address $25 

• Grocery Mart $ 1 5 



• hventor/ $20 

• Shopper $20 

• Dinner's On! $15 



GAMES & SIMULATIONS 



• Fur Tropper $15 

• High 5eo5 $15 



• Mansion! $15 

• Museum! $15 

• Pentagon! $15 

Send for free catalog! 

'^HARRY H. DRILEY 

P.O. Box 2913 

Livermore, CA 94550 

(415)455-9139 

Deolers Letterheod inquiries inviied Phoiocopies of thiod ore NOT valid coupons. One 
coupon per purchose This coupon n-ioy be redeemed foi face value plus 1 5' Tor hondling 
if i[ WQ5 received from customer upon purchose of one of ihe above progromi. Offer voitf 
where rescfiaed by low 





Money Back Guarantee 



Dealer Inquiries Welcome 



New 248-page book includes all the lormer TIS workbooks 
except "PET Graphics." Provides Information lor both ROMs and 
a comprehensive index. Only $14.95. 



Also from TIS 

WB-3 PET Graphics 



S4 95 



Software products on cassetle or floppy disli with complete instruction 
manual. Each S24 95 (cassette). S29 95 (diskette) 

SW-i MAIL a malting list system 

SVI-2 CHECKBOOK record 

SW-3 ACCOUNTS keep track Of who Owes you how ituicli 

SW-4 MED1T create and maintain date files 

SW-5 CALENDAR apDOintmenls. meetings at-a-glance 



TIS 

P.O. Box 921, Dept. C 

Los Alamos, MM 87544 



Add S2 (S5 foreign orders) 
itiipping and handling 



PEI .iiw CBM are tiarli'ninrks ol Comniotfoie Business (vtacnincs 



118 



COMPUTE! 



March, 1981, Issue lO, 



590 REM ** 672 
595 OPEN15,8,15:EL=595:GOSUB5100 

600 REM ** PAGE 1/lNTRODUCTION, TRACKS 674 
605 OPEN1,0:PRINTZG$:PRINTTAB{9) "^trDISK 

-. RECOVERY PROGRAM 676 
610 PRINT"T^t PUT DISK FOR RECOVERY IN -. 

-n xDRIVEf xl 678 

615 PRINT"^Ti'i^ HIT ANY KEY WHEN xDISKr -. 680 

-.IS IN PLACE, 

620 PRINT"i (DISK WILL THEN BE -. 682 

-.INITIALIZED) ":GOSUB4000 

625 PRINT#15,"I1":EL=625:GOSUB5100 684 
630 PRINT"\>ii' START: TRACK xl7f (DOVfN) -. 

lOR xl9f <UP) ? xl7f«x"; :INPUT#1, 686 

-iSRiPRINT 

635 IFSR<>17ANDSR<>19THENPRINT"TTTT": 688 

-.GOTO630 

640 PRINTTAB(7) "\|'END SEARCH AT TRACK: 690 

<«4x"; :INPUT#1,SP: PRINT 

645 IFSR=17THENIFSP<10RSP>16THENPRINT"TT 692 

-.T":GOTO640 694 

650 IFSR=19THENIFSP<20ORSP>35THENPRINT"T 696 

-nTT":GOTO640 . 700 

655 CLOSE1:FORJ=0TO1000:NEXT 705 
660 REM ** PAGE 2/DESCRlPTION 

662 P0KE59468,14:PRINTZG$:PRINT"tJ'TRACKS" 710 

-.SR"TO"SP"WILL NOW BE SEARCHED FOR 715 

664 PRINT"M^it'FILES. THE INITIAL AND -. 720 

-.ENDING BLOCKS 725 
666 PRINT"AND THE LENGTH OF EACH -. 

-.RECOVERED FILE 730 

668 PRINT"ARE RECORDED. (TRACK -. 735 

-.SUMMARIES ARE 740 

670 PRINT"ALSO DISPLAYED) . 745 



SEARCH CAN RUN CONTINUOU 



AFTER EACH OPERATION, 

EACH OPERATION, 

TO THE SUMMARY. 
X£f FOR CONTINUOUS 

Oif FOR HALT IK -. 



PRINT"\i'lHIS 

-.SLY, BE 
PR1NT"HALTED 

-. HAVE A 
PRINT"PAUSE AFTER 

-. OR BE ENDED 
PRINT"WITH A JUMP 
PRINT"t'i' 3:ype 

-. RUNNING 
PRINT" TYPE 

-lOPERATION 
PRINT" lYPE xPf FOR PAUSES IN -. 

-.OPERATION 
PRINT" TYPE x£f TO ESCAPE TO -. 

-.SUMMARY 
PRINT"ti^QPERATIONAL MODE MAY BE -. 

-.CHANGED DURING 
PRINT"THE SEARCH BY 

-.ABOVE COMMANDS AT 
GOSUB4000:B$=A$ 
PRINTZG$:P0KE594 68,12 
OPENS, 8, 2, "#2":EL=695 
REM ** FIND INITIATOR 
P(0)=TR:GOSUB5010:REM 

-.OF BLOCKS IN TRACK 
FORK=0TOSM: P ( 1 ) =K : REM 
:IFD% (P(0) ,P(1) ,2)<>0GOTO735 
:GOSUB5020:REM @ GET LNKS/OUT PTRS 
:IFL{0)=0THEND% {P(0),P(1),2)=64: 

-nGOT0735 :REM @ END OF FILE FOUND 
:GOSUB5040:REM @ IN PTRS TO NXT BLK 
NEXT 

GOSUB4060:REM @ TRK TABLE 
REM ** FOLLOW LINKS FOR EACH START 



TYPIITC THE 
ANY TIME. 



:TR=SR:K=1 
;GOSUB5100 

BLOCKS 

@ GET NUMBER 

TR 

(3 SEARCH TRK 




PET/CBr IEEE-i|88 TO PARALLEL PRINTERS 

THE P.I.E.-C IS COMPATIBLE WITH 
Centronics, NEC "Spinwriter" , Escon Products, AJ-841, 
IDS "Paper Tigers", Anadex, "MIPLOT" by Watanabe, etc. 
**** * + ** + + + + 

Fully assembled and attractively enclosed. Connected 
with, and powered by, the printer using the 6' data 
cable. Independently addressable as Device# 4 to 30. 
IEEE-488 Bus Extension for floppy disks, etc. Switch 
selectable PET-TO-ASCII code conversion. No software 
drivers required — Uses BASIC 488 commands instead. 
**** + + + * * + + + 

ORDER TODAY — ONLY $119.95 (+$5 S&H) ( Md . Res. +TAX) 
Specify printer model plus PET model and ROM level 

LemData Products (301) 730-3257 
P.O. Box 1080, Columbia, Md. 21044 



p 




■ 



'PET/CBM are trademarks of Commodore Business Machin 



es 



Morch. 1981, Issue lO- 



COMPUTE! 



119 



750 
755 
760 
765 
770 
775 
780 
785 

790 
795 
800 
805 
810 
815 
820 
825 
830 
835 
840 
845 

850 

855 

860 

865 

1000 

1005 

1010 

1015 

1020 
1025 
1030 
1035 
1040 
1045 
1050 
1055 
1100 
1105 

1110 
1115 
1120 
1125 
1130 
1135 
1140 
1145 
1150 
1155 
1160 
1165 
1200 
1205 
1210 
1215 



P(0)=TR 

FORK=0TOSM : P ( 1 ) =K : N=l 

IFD% (P(0),P(1),0) O0GOTO835 

S%(M,0)=P(0) :S%{M,1)=P(1) 

GOSUB4010:REM PRINT DISPLAY 

PRINT" T"TAB (14) S$N,S$P(0) ,SSP(1) 

GOSUB5020:REM @ GET LINKS 

IFL(0)=0THEND% (P(0),P(1),2)=64: 
-.GOTO805 

GOSUB5040:REM @ IN PTRS TO LNK BLK 

P{0)=L(0) :P(1)=L(1) :N=N+1 

GOT0775 

REM @ CLOSE END OF LNK SEQUENCE 

S%(M,2)=N:S% (M,3)=P(0) 

S%(M,4)=P(1) 

GOSUB4020:REM @ COMPLETE DISPLAY 

IFB$="S"THENK=SM 

M=M+1:P(0)=TR:REM (§ RESETS 
NEXT 

IFB$="S"GOTO1000 
TR=TR-1:IFSR=19THENTR=TR+2:REM @ GO - 

-.ON TO NEXT TRACK 
RE^5 @ TEST FOR END TRACK 
IFSR=17ANDTR<SPGOTO1000 
IFSR=19ANDTR>SPGOTO1000 
GOTO700 

REM ** PRINT OUT SUMMARY 

K=0:B$="H" 

PRINTZG?; : PRINTTAB ( 11 ) "^l'xFILE -. 
-.SUMMARY" 

PRINT "^iSEQ #", "BLOCKS"," START ", 
-." FINISH 

PRINT,, "TR SEC","TR SEC" 

FORJ==l+15*KT015 + 15*K 

: IFJ>M-1THENJ=15+15*K:GOTO1045 

:GOSUB404 0:REM FORMAT NUMBERS 

:PRINT" "J," "S%(J,2) ,A$,Z$ 

NEXT 

K=K+1 : PRINT "i": GOSUB40 3 

IFJ<MGOTO1010 

REM ** CHOICES 

PRINTZG$:PRINT"i^^^i>xCHOICESf : 
XLfOOK: FIRST 240 BYTES 

PRINTTAB (12) "^J-nSrUHMARY REVIEVJ 
"ixRfETRIEVE A FILE 

SCAN OTHER BAND 
DIFFERENT DISK 

PRINTTAB{12) "irEfXIT PROGRAM 

GOSUB4000: IFA$="L"GOTO1200 

IFA$="S"GOTO1000 

IFA$="R"GOTO150O 

IFA$="B"THENCLOSE8:GOTO600 

IFAS="''"THENGOSUB405 0;RUN400 

IFAS="E"THENGOSUB405O:PRINTZG$rEND 

GOT01135 

REM ** GET 1ST PAGE OF FILE DATA 

INPUT"i^^lHNPUT TRACK, SECTOR";J,K 

IFJ>35ORJ<1GOTO1100 

P(0)=J:GOSUB5010 : IFK<0ORK>SHGOTO110 



PRINTTAB (12) 
PRINTTAB (12) "^J-jiBf 
PRINTTAB (12) "tr"f 



1220 P(1)=K:GOSUB5020:REH @ LNKS L(0) -. 

-L(l) 
1225 A=2:GOSUB5070:REH @ READ NEXT -. 

-.BYTES (SET BP) 
1230 GOSUB5050:PS=A:REM @ START BASIC 
1235 GOSUB5050:PL=A:REM @ 1ST PROG LINK 
1240 GOSUB5050:PN=A:REM @ 1ST LINE # 
1245 A=2:GOSUB5070:REM (3 GET STRING 



IEEE-488 BUS 

SYSTEM BUILDING BLOCKS 

For Commodore PET/CBM and other computers. 




TNW-2000 



TNW-1000 Serial Interface: $129 

t rhanrn.'l OLiljJut only 

TNW-2000 Serial Interface: $229 
TNW-232D Dual Serial Interface: $369 

P ( i.inniiis inpjl ana ou1l3ul |.ilus BS-J3? conliol lines 

TN W-1 03 Telephone Modem: $389 



O^^C^r%Jl#A ^)C '''■'E"*'-" P'^B'^'^'^anums you. PET inio a terminal 

j\_^r I WA\riC iUse vj.'HTNW-JOnn. TNW-232D. or TNW 103) 

SWAP: Anoi^s slnrage 01 uD ro B prografus m PET 

PLUS Most popula; campul.,."-, "'^°"' ^' °"™ """ '^^ '" ■S"* °"'^' 

disJ^S pii^.ty'S elc PAN: ^ soph'slicdfed flocl'onic rnaii program 

■ use w.l^ TNW-1031 

Write or call tor Information today: 

TNW Corporation 

3351 HnncDck Street 
Sir. Diego CA 9211D 

(714) 225-1040 



'^^^^ CDK!'OH.MIU% 










..being yc compleni 

calalogur of pc^rlphridts 

j^jiUblr For your PET 



X 



ilOO 



ip 



iO,>'' ^^ jitfe 



Works 



Skylcs Electric Works 

231 E South Whisman Road 
Mountain View. CA 94041 



120 



COMPUTE! 



March, 1981. Issue lO, 



1250 Z$="" 

1255 FORJ=0TO250 

1260 :GET#8,A$:GOSUB5060:Z$=Z$+A$ 

1265 NEXT 

1270 Z$=CHR$(L(0) )+CHR$(L(l) )+Z$ 

1275 PRINTZG$TAB(12) "xFIRST PAGE DATA": 

-.REM @ PRINT DATA 
1280 PRINT,, HxTRACK", "SECTOR 
1285 PRINT"INITIAL BLOCK ", P ( ), P (1 ) 
1290 PRINTTAB(15) "xBYTES 
1295 PRINT"BLOCK POINTER "TAB ( 16 ) "0&1 " , 

-.L(0) ,L(1) 
1300 PRINTTAB{20) "xDECIMAL VALUE 
1305 PRINT"PRGRM START"TAB ( 16 ) "2&3 "TAB (2 

-.3) PS 
1310 PRINT"1ST LINK"TAB(16) "4&5"TAB(23)P 

-.L 
1315 PRINT"1ST LINE # "TAB ( 16 ) "6£<7 "TAB ( 23 

-.) PN 
1320 PRINT"xHEX VALUES 
1325 FORJ=0TO5 

1330 :A=8*J:GOSUB5080:PRINT" "A$" : " ; 
1335 :FORK=0TO7 

1340 : :A=ASC(MID$(Z$,8*J+K+1,1)) 
1345 : :GOSUB5080:PRINTA$" " ; 
1350 :NEXT:PRINT 
1355 NEXT 

1360 PRINT"t^xCHARACTER VALUES:^" 
1365 K=0 
1370 PORJ=1TO80 

1375 :A=ASC(MID$(Z$,J+80*K,1)) 
1380 :GOSUB5090 
1385 NEXT 
1390 PRINT"^ 'C' TO CONTINUE: +/- -> 

-^CHANGE LINE SCAN" 
1395 GOSUB4000:IFA$="C"GOTO1100 
1400 IFA$="+"ANDK<2THENPRINT"TTTT"; : 

-,K=K+1:GOTO1370 
1405 IFA$="-"ANDK>0THENPRINT"TTTT"; : 

-.K=K-1:GOTO1370 
1410 GOT01395 

1500 REM ** RETRIEVE A FILE 
1505 INPUT"^t^STARTING TRACK, SECTOR";J, 

-.K 
1510 IFJ>35ORJ<1GOTO1100 

1515 P(0)=J:P(1)=K:GOSUB5010:IFK<0ORK>SM 

-.GOTO1100 
1520 PRINTZGSSPC(10) "xFILE RETRIVAL 
1525 PRlNT"i^tRETRIEVING THE FILE -i 

-nSTARTING AT:" 
1530 PRINTTAB(3) "TRACK x"P ( ) " f "TAB ( 20 ) " 

-.SECTOR x"P{l) 
1535 PRINT"^NAME FOR RETRIEVED FK^i^'TTL 

-iE:": INPUT" ";F$ 
1540 PRINT "li' IS THIS A xPfROGRAM OR A ^ 

-iXSf EQUENTIAL FILE" 
1545 GOSUB4000:IFA$="P"THENT$="PRG": 

-.PRINT" xPROGRAM":GOTO1560 
1550 IFA$="S"THENT$="SEQ": PRINT" -, 

-■XSEQUENTIAL" :GOTO15 60 
1555 GOT01545 
1560 PRINT"^PUT GOOD DISK WITH SUFFICIEN 

-.T BLOCKS IN DRIVE x0 
1565 PRINT"it'INITIALIZE? ( Y/N) " :GOSUB4000 
1570 IPAS="Y"THENPRINT#15, "10 " : EL=1535 : 

-.GOSUB5100 
1575 GOSUB4030 



1580 PRINT"t^xIS EVERYTHING OKf? TYPE -i 

-.'C TO GO! 
1585 PRINT" i^(ANY OTHER LETTER WILL -. 

-.ABORT) i^":GOSUB4000 
1590 IFA$<>"C"GOTO1100 
1595 REM ** RETRIEVE PROGRAM 
160 OPEN9,8,4, "0: "+F?+" , "+T$+", WRITE " : 

-.EL=1600:GOSUB5100 
1605 EL=1555:GOSUB5100 
1610 PR1NT"C0PYING TRACK : "P ( ) TAB ( 21 ) "SE 

-.CT0R:"P(1) 
1615 GOSUB5020:P(0)=L(0) :P(1)=L(1) : 

-.REM @ GET LINKS 
1620 A=255:1FP(0)=0THENA=P(1) 
1625 F0RJ=2T0A 

1630 :PRINT#15, "M-R" ;CHR$ ( J ) ;CHR$(19) 
1635 :GET#15,A$:GOSUB5060 
1640 :PRINT#9,AS; 
1645 NEXT:EL=1570 
1650 IFP(0)<>0GOTO1610rREH @ GET NEXT -. 

-.BLOCK 
1655 CL0SE9:PRINT"^^xFILE RECOVEREDt": 

-.GOSUB4030 :GOTO1100 

4000 REM ** GET AND HOLD 

4001 FORA=0TO10:GETA?:NEXT 

4002 GETA$:IFA$=""GOTO4002 

4003 REM la SCREEN DUMP: IFA$= "P"THENGOSUB 

-.'SCREEN DUMP' 
4005 A=VAL(A$) 

4009 RETURN 

4010 REM ** PRINT DISPLAY OF RECOVERED -. 

-SEQUENCES 

4011 PRINTZG$:PRINTTAB(7) "^RECOVERED -. 

-.DISK SEQUENCES 

4012 PRINTTAB(12) "^|'SEQUENCE"M 

4013 PRINT,, "i^TRACK", "SECTOR" :PRINT"^xST 

-.ART", ,S%CM,0) ,S%(M,1) 

4014 PRINT"^^PRESENT BLOCK ": RETURN 

4020 REM ** BOTTOM OF DISPLAY 

4021 PRINT"txEND", ,S% (M,3) , S% (H,4) 

4022 PRINT"iNUMBER OF BLOCKS ", S% {M, 2 ) 

4023 PRINT"^^^ (C-CONT P-PAUSE H-HALT -, 

-.S- SUMMARY) 

4024 GOSUB4070: RETURN 

403 REM ** TYPE ANY KEY 

4031 PRINTTAB(7) "TYPE ANY KEY TO -. 

-nCONTINUE":GOSUB4000:RETURN 
4 040 REM ** FORMAT NUMBERS 

4041 A$="x"+RIGHT$(STR$(S%(J,0) ) , 

-.2)+" "+RIGHTS(STR${S%(J,1) ) , 
-2)+"r 

4042 Z$=R1GHT$(STR$(S%(J,3)) ,2)+" 

-."+RIGHTS(STR$(S%(J,4) ) ,2) 

4043 RETURN 

4050 REM ** CLOSE PILES 

4051 PRINT#15 , "B-P, 2 , " : CLOSES :CL0SE15 : 

-.RETURN 
4 060 REM ** PRINT TRACK SUMMARY TABLE 

4061 PRINTZG?:PRINTTAB(8) "TRACK -. 

-iX"TR"r SUMMARY TABLE 

4062 PRINT"SEC ± TR xINf SC 1 TR -. 

-. xOUTf SC 

4063 FORJ=0TOSM:PRINTJ;:FORK=0TO3 
406 4 PRINTTAB(5+9*K)D%(P(0) , J , K ) ; 

4065 NEXT:PRINT:PRINT"T"TAB(4) "1"SPC(14) 

-i"i":NEXT 

4066 GOSUB4070: RETURN 



March. 1981, issue lO. 



COMPUTE! 



121 



4070 
4071 

4072 
4073 
4074 
4075 
4076 
5010 
5011 
5012 
5013 
5014 
5020 

5021 
5022 
5023 
5024 
5026 
5028 

5030 
5040 
5041 
5042 
5043 
5050 
5051 
5052 
5053 
5054 
5060 
5061 
5062 
5070 
5071 
5072 
5080 
5081 

5090 
5091 

5092 

5093 
5094 

5095 
5100 
5101 

5102 

5105 

5107 

5109 

READY 



REM ** PAUSE/STOP CONTROL 
GETA$:IFA$="H"ORA$="C"0RA$=''P"ORA$= 

-."S"THENB$=A$ 
IFB$="H"THENGOSUB4030: RETURN 
IFB$="P"THENFORJ=0TO5000:NEXT 
GETA$:IFA$="P"THENGOSUB4003:RETURN 
IFA$= "H "ORA$= "C"ORA$= "S "THENB$=A$ 
RETURN 

REM ** NUMBER OF BLOCKS IN TRACK 
SM=16:IFP(0)<31THENSM=17 
IFP(0) <25THENSM=19 
IFP(0) <18THENSM=20 
RETURN 
REM ** GET LNKS— P(0)P(1) IN: 

-.L{0)L(1) OUT—OUT PTRS SET 
PRINT#15 , "Ul : " ; 2 ; 1 ; P ( ) ; P ( 1 ) 
EL=5021:GOSUB5100 
FORJ=0TO1:REH @ GET LINKS 
:PRINT#15, "M-R";CHR$(J) ;CHR$(19) 
:GET#15,A$:GOSUB506 
:L(J)=ASC(A$) :D%(P(0) ,P{1) , 

-.J+2)=L(J) 
NEXT:A=2 :GOSUB5070 :RETURN 
:REM ** IN POINTERS FOR LINK BLOCK 
:FORJ=0TO1 

::D%(L(0) , L (1 ) , J) =P ( J ) 
: NEXT: RETURN 
REM ** GET DEC VALUE-2 
GET#8,A$:GOSUB5060:REM 
A=ASC(A?) 

GET#8,A$:GOSUB5060:REM 
A=ASC(A$) *256+A: RETURN 
REM ** WHEN A$="" 
IFA$= " "THENA$=CHR$ ( ) 
RETURN 

REM ** SET B-P 
PRINT#15,"B-P,2, ";A 
EL=5071:GOSUB5100:RETURN 
REM ** DEOHEX 
A$=MID$(H$,1+(24 0ANDA)/16,1)+MID$(H 

-.$,1+(15ANDA) ,1) :GOSUB5060:RETURN 
REM ** ASC > CHARACTERS 
IFA<32THENPRINT"x"CHR$(A+6 4} "f "; : 

-.RETURN 
IPA=340RA=98THENPRINTCHR$ (34) CHR$ (3 

-.4)CHR$(20) ;: RETURN 
IFA<128GOTO5095 
IFA<160THENPRINT"x"CHR$ (A+32) "r "; : 

-.RETURN 
PRINTCHR$(A) ; : RETURN 
REM ** CHECK DISK ERROR 
INPUT#15,EN$,EM$,ET,ES:IFEN$="00"TH 

-lENRETURN 
PRINT"^('iJ'iDlSK ERRORf AT PROGRAM -. 

-iLINE "EL 
PRINT"^ERROR MESSAGE: "EN$" "EM$, 

-.ET", "ES 
IFEN$="22"GOTO1000 
END 



BYTES 
@ LO 

@ HI 



MOR€ SOfTUJARC TOOLS 
FROM H€S FOR VOUR 8K 

by Joy Bolakrishnon 



PET- 






HESEDIT : change 22 lines of data by merely over 
nserl, delete, and even duplicate lines- 
Scroll forwards or backwards by any 



typing and 

all at once! 

amount — it's also easy to edit files bigger than your 

memory. Why code a program to maintain each file? 

Use HESEDIT for mailing lists, notes or prepare 

assembler source for HESBAL. All keys repeat. FAST 

written in BASIC and assembler. ONLY $12.95 

6502 ASSEMBLER PACKAGE: HESBAL, a full-featured 



assembler with over 1200 bytes free (8K) & HESEDIT; 
for less than S25! HESBAL is THE best 8K assembler 
available: it uses only 1 tape or disk, yet includes 
variable symbol sizes, pseudo-opcodes, over 25 error 
messages and more than 70 pages of documentation. 

ONLY $23.95 

HESLISTER: formats multi-statement line BASIC 



programs, shows logic structure (disk reqd.) $9.95 

GUARANTEED to load or replaced FREE 
Order fronn your dealer or direct fronn us 
Plus $1.50 Postage (our doc. is heavy!) 
Disk - Add $3 . Calif Res. - 6% Sales Tax 
Dept c 3 Humon engineered SoFtujore 
3748 ingleiiiood Blvd. floom 1 1 
Los Angeles. CQliforniQ 90066 

24 HOURS - (213) 398-7259 

Dealer inquiries ujelcomed 



CBM/PET Computers & Such! 



Features lor Mar/Apr 31: 

Recondll loncd SELECTRlCs 
11" cirri aRe $449 

If^" cjirrlase $ 'i''.9 

15" carr.h/d.PF.T i/f it 2')', 

Micro Software Systems 

Bi llboard tor 8032 $ 39 

Bl 1 Iljoard for 2001 t 29 

Cur&or Magazine (on tdpc, 

specify issues. Write 

for catalog) 10/$44.9S 

Cable. I'KT-IF,F.E $ 37 

Cable. lEKE-lKEE $ 47 

Modem * lerninal software! 279 

NEC Spinwriler *5530 $2695 

Xymec typewr i I er/prl nt pr $2499 

Centronics 737. I'ET i/t i 899 

Epson MX-80, PET i/f t 599 

Watanabe MIPLOT $1149 

Uncrasher I for new 200J) % 15 

Free cassette drive with 16/32k CBM 



CALL FOR CURRENT 

PRICES ON CBM/PET 

EQU IPMENT 



CONNECT PET/CBM TO I'KINTEK: Simply plus! into the inlcrlace 
,)nd use your PKT/CHM computer with popular "standard" 
printers, or add a video monitor for a second disjilay 
interfaces are assembled, tested ^-"' ■ * ' 

is required. 



All 
and waranteed. No software 



Xymer, or other industry 
Works with disk, other IEEE 



TU-65C Use NEC. Centronics, 

standard parallel printei^s. 

devices attached. $129.95 
TU-6514 Use SS-232 (serial) printers, like Hialhklt "-■'• 

300 In 4800 baud (please specify rate desired!. 

includes power pack. $79.95 
TU-I'VE Connect your Video Moniior !o PET /CBM for second 

display. Our unique contact extensions leave 1 he user 

port available for connection 

$39-95 (HOT for 8016/321 
ESCON Interfaces: 



ol other accessories. 



SEI.ECTRIC to PET /CBM 
SELKCTR1C to Apple. Atari 
SEI.ECTRIC to Apple. Atari 
MTST-l/0 to I'aral lei 
C.ibles extra, $20 lo $90. 



TR5-B0: Parallel 
TRS-80; RS-232 Serial 



Insta I I at i on 



$649 
$549 
$579 
$425 
$100 



Virgiaia Micro Systems 

14415 Jefferson Davis Highway 

Woodbridge.Ui.ginia 22151 (703) 491- &502 



VISA/MC. VA t4% 
Factory auih 
sal es S service 
MWF 12-8. Sa 9-3 




m 



COMPUTE! 



March, 1981. Issue lO. 



\ 

\ 




,^ 



Get Fireworks From 
^ Your PET !# 





DUNGEON OF DEATH CODE NAME: CIPHER 



DUNGEON OF DEATH Battle evil 
demons, cast magic spells, and accumu- 
late great wealth as you search for the 
Holy Grail. You'll have to descend Into 
the Dungeon of Death and grope through 
the suffocating darkness. If you survive, 
glory and treasure are yours. For the PET 
BK. Order No. 0064P $7.95. 



ARCADE I 



TREK-X 

TREK-X Command the Enterprise as you 
scour the quadrant for enemy warships. 
This package not only has superb graph- 
ics, but also includes programming for 
optional sound effects. A one-player 
game for the PET 8K. Order No. 0032P 
$7.95. 



ARCADE I This package combines an ex- 
citing outdoor sport with one of 
America's most popular indoor sports; 

• Kite Fight — It's a national sport in India. 
After you and a friend have spent several 
hours maneuvering your kites across the 
screen of your PET, you'll know why! 

• Pinbait-By far the finest use of the 
PET'S exceptional graphics capabilities 
we've ever seen, and a heck of a lot of fun 
to boot. 

Requires an 8K PET. Order No. 0074P 
57.95. 



CODE NAME:CiPHER 

Enjoy that same feeling of intrigue and 
discovery with the Code Name: Cipher 
package. Included are; 
•Memory Game — Would you like to 
match your memory against t+ie com- 
puter's? You can with the Memory Game. 
•Codemaster — One player types in a 
word, phrase, or sentence, and the PET 
translates that message into a crypto- 
gram. The other player must break the 
code and solve the cryptogram in the 
shortest time possible. 
•Deceitful Mindmaster — This isn't your 
ordinary fvlastermind-type game. You 
must guess the five letters in the hidden 
code word. 

•Code Breaker- Cracking this code 
won't be as easy as cracking walnuts. 
You'll need to flex your mental muscles 
to win this game. 

If you want a mental challenge, then 
Code Name: Cipher is for you. For the 8K 
PET. Order No. 0112P. $7.95. 



Instant Software 



M * A trademark of Commodore Business Machines 

PETERBOROUGH, N.H. 03458 
603-924-7296 



March. 1981. Issue lO. 



COMPUTE! 



123 



Captivate Yourself. 

Santa Paravia 



and Fiumaccio 




SANTA PARAVIA AND FtUMACCIO 

Become the ruler of a medieval city-state 



as you struggle to create a kingdom. Up 
to six players can compete to see who 
will become the King or Queen first. This 
program requires a PET 16K, Order No. 
0175P.S9.95. 



CHIMERA 



CHIMERA If you think the legendary 
Chimera was hard to handle, wait until 
you try the Chimera package. Included 
are: 

• Reflex- Round and round the little 
white ball rolls. Only fast reflexes can 
guide it into the center of the maze. 

• Dragon — You'll have to shoot down 
those pesky, fire-breathing dragons with 
your cannon. If you succeed your castle 
will be safe, if not it will mean a call to 
your fire insurance company. For one 
player. 

• Dungeon — A very punctual guard 
comes down to the dungeon every day to 
torture you. This means that you have on- 
ly thirty seconds to dig your way under 
the castle to freedom. For one player. 

• Dragon Hunt -You must go forth and 
slay a fire-breathing dragon. The only 
thing that will protect you from the 
flames is your shield, if you l<now when to 
use it. For one player. 

• Dropoff -You must make your oppo- 
nent's men "dropoff" the board by mov- 
ing and firing your own men. For one or 
two players. Order No, 0110P. S9.95. 



PET DEMO I 

PET DEMO I You can give yourself, your 
family, and your friends hours of fun and 
excitement with this gem of a package. 
•Slot Machine -You won't be able to 
resist the enticing messages from this 
computerized one-armed bandit. 

• Chase-You must find the black piece 
as you search through the ever-changing 
maze. 

• Flying Pheasant -Try to shoot the fly- 
ing pheasant on the wing. 

• Sitting Ducks - Try to get your archer to 
shoot as many ducks as possible for a 
high score. 

• Craps -It's Snake Eyes, Little Joe, or 
Boxcars as you roll the dice and try to 
make your point. 

• Gran Prix 2001 -Drivers with experi- 
ence ranging from novice to professional 
will enjoy this multi-leveled race game. 

• Fox and Hounds -It's you against the 
computer as your four hounds try to cap- 
ture the computer's fox. 
For true excitement, you'll need a PET 
8K. Order No. 0035P S7.95. 



TO ORDER 



SEE YOUR LOCAL 
INSTANT SOFTWARE 
DEALER 



OR 



/ 



^ 



Toil-Free 
1-800-258-5473 



Instant Software 



The most captivating 
and engrossing pro- 
gram ever made for 
the PET* 

It Is the dawn of the 15th Century; 
you rule a tiny Italian city-state. Your 
goal: The Crown! 

Up to six players can compete as 
rulers of neighboring cities. You con- 
trol the grain harvest, feed your serfs, 
set tax rates, dispense justice and In- 
vest in public works. 

The future of your realm will de- 
pend on your decisions. If they are 
wise, your city-state will grow and 
you will acquire loftier titles. If your 
rule is Incompetent, your people will 
starve and you may be Invaded by 
your neighbors. 

How will you rule your kingdom? 
Will you be an enlightened leader— or 
an unscrupulous despot? Only you 
can answer that question— with San- 
ta Paravia and Fiumaccio. 

DOW JONE$ 

DOW JONES Up to six pi. .yers can enjoy 
this exciting stock market game. You can 
buy and sell stock in response to chang- 
ing market conditions. Get a taste of 
what playing the market is all about. Re- 
quires a PET with 8K. Order No. 0026P 
$7.95. 

We Guarantee It I 

I (^^,t»nt Sof,H. ;*: 
^yo Guarantee ^^^ 

Prices subject to change without notice. 
'A trademark of Commodore Business Machines 

PETERBOROUGH, N.H. 03458 
603-924-7296 



OUR I'ROCiKAM.S ,\RF. CU ARANir FD 
TO Bl yUM-ITV PRODUt IS. IT NOr 
COMl'l 1 Tll-V SATISFII I) YOU MAY 
Ki TUR\ IIIF I'ROdRAM WITHIN fiO 
DAV.S. A (Rl nil OR RIS'LACi'Ml.M 
Wn.l Hi WlLIINCl-Y (IIVIN 1-OR 
ANY RtASON. 



124 



COMPUTE! 



March. 1981, Issue lO. 



_ _ 








0010 


PET EXEC-HELLO 


Vt^m EYA^ 








0020 


FOR 'UPGRADE (3.0) ROM' 


■ ^ 1 E./V^ Wr 








0030 


AS OF MOV 26, 19 80 










0010 


SAVED AS ipEH ML V5 ' 


■ ■ ■■ 








0050 




IJ^^II^^ 








0060 


COPYRIGHT (C) 19S0 - 


neiio 








007 
0080 
0090 
0100 
0110 


BY GORDON CAMPBELL 

36 DOUBLETREE ROAD 
WILLOWDALE, ONTARIO 
M2J 3Z1 
PHONE (116) 192-9518 


Gordon Campbell 








0120 
0130 


PERMISSION TO MODIFY OR COPY FOR 


Toronto, Canada 








0110 
0150 


NON-COHHERCIAL PURPOSES IS HEREBY 
GRANTED, PROVIDED THAT THE COPYRIGHT 


When you turn on your Pet, what 








0160 


AND THIS NOTICE IS RETAINED. 








0170 




do you do next? I found that there 
was a standard set of commands, 








0180 


THIS PROGRAM IS INVOKED BY THE BASIC 








0190 


PROGRAM 'SIGNON'. IT RUNS IN UNPROTECTED 








0200 


MEMORY BY DESIGN, SO IT SHOULD BE 


which went along with the par- 
ticular diskette being used. For ex- 








0210 


INVISIBLE TO OTHER OPERATIONS. ANY REALLY 








0220 


BIG PROGRAM WILL SHEAR IT. ANYTHING 








0230 


WHICH USES INTERRUPTS (EC. AUTO REPEAT 


ample, for program development. 








02140 
0250 


KEYBOARD) WILL EITHER COME TO GRIEF 
OR SIMPLY DISENGAGE IT. THATS OK IF 


the commands I use arc: 








0260 


IT'S THE LAST COMMAND. 


POKE 59468, 14 (set upper and 








0270 
0280 


THE EXCEPTION IS 'LOAD', WHICH I WATCH 


lower case) 








0290 


FOR. IF THERE IS A LOAD, I GENERATE 


POKE 59458, 62 (this may damage 








0300 


A 'SYS 0' TO RE-ENGAGE. 


YOUR machine) 
OPEN 1,8, 15, "10" (because DOS 








0310 










0320 
0330 


TRY TO AVOID DOS COMMANDS WHICH MAY 
CAUSE TROUBLE. FOR EXAMPLE, USE: 


is first) 








0310 


LOAD"$0",8 


LOAD "BASIC AID", 8 (extensions 








0350 


LIST 


to BASIC 








0360 
0370 
0380 


NEW RATHER THAN >$0 


SYS 7*4096 (invoke BASIC AID) 








.BA $6100 


DISK "$0" (directory) 








0390 


.OS 


REPEAT (turn on auto-repeat 

keyboard) 








0100 , 




6400- 


1C 17 


61 


0110 
0120 ; 


JMP ENTRY ;SKIP AROUND FILENAME 


Eventually, you get tired of is- 


6U03- 


IS 15 


1C 


0130 ; 

0110 FNAME .BY 'HELLO, F.R' 


suing the same old commands over 


6406- 


1C IF 


2C 






and over. So I did something about 


6109- 
6JJ0C- 


50 2C 
00 00 


52 
00 






it. PET EXEC HELLO is a suite 


etOF- 


00 00 


00 


0150 


.BY 00000000 


of three small programs which 


6il12- 
6«15- 


00 00 
00 00 


00 






allow you to use a 'HELLO' file 








0160 ; 




on disk. 


6117- 


A2 00 




0170 ENTRY LDX 110 


6119- 


BD 03 


61 


0180 SHLOOP LDA FNAME, X ; FIND LENGTH 


The HELLO file consists of a 


611C- 


FO 03 




0190 


BEQ LENFND ; OF FILENAME 


set of direct commands which are 


641E- 
6tnF- 


E8 
DO F8 




0500 
0510 


INX 

BNE SHLOOP ; JUMP 


executed when you 'boot' from the 








0520 ; 




disk. The first file on the disk must ' . 


6121- 


8E 7A 


65 


0530 LEHFND SIX FNLEN 
0510 ; 


be the SIGNON program. It prints 
a greeting, and invokes a machine- 


61)21- 
6126- 


A9 OF 
85 D2 




0550 
0560 


LDA /'SOF ; OPEN 
STA *FNUH ; CONTROL 


6128- 


A9 08 




0570 


LDA #8 


language program called EXEC 
HELLO. EXEC HELLO reads in 


612A- 
612C- 
612E- 


86 D1 
A9 OF 
09 60 




0580 
0590 
0600 


STA «DEV ; CHANNEL 
LDA SSOF ; 15,8, 15 
ORA *S60 


the whole HELLO file, and feeds it 


6130- 
6132- 


85 D3 
A9 00 




0610 
0620 


STA *SCNDRY 
LDA *0 


to the keyboard buffer one 


61431- 


85 Dl 




06 30 


STA »0PLEN ; NO FILENAME 


character at a time. At the end of 


6136- 
6138- 


85 96 
20 21 


F5 


O6U0 
0650 


STA »ST 

JSR OPEN ; ROM ROUTINE 


the commands, EXEC HELLO 








0660 ; 




disengages. BUILD HELLO is a 


613B- 
613D- 


A9 08 
85 D2 




0670 
0680 


LDA tfS ; OPEN 
STA "FNUK ; TEXT 


program which helps you create 


613F- 


85 Dl 




0690 


STA *DEV ; FILE 


6111- 


09 60 




0700 


OHA f/S60 ; 8,8,8 


HELLO files. 


611*3- 


85 D3 




0710 


STA *SCNDRY 




6115- 


AD 7A 


65 


0720 


LDA FNLEN ; LENGTH OF 




6118- 


85 Dl 




07 30 


STA 'OPLEN ; FILE NAME 




euiA- 


A9 61 




0710 


LDA #H, FNAME 




6U1C- 


85 DB 




0750 


STA »FNPTR+1 ; AND IT'S 


SIGNON - NOV 26, 19 80 PAGE 1 


6mE- 


A9 03 




0760 


LDA #L, FNAME ; ADDRESS 




61450- 


85 DA 




0770 


STA »FNPTR 


100 IF PEEK (13) THEN 160 


6152- 


A9 00 




07 80 


LDA ItO 


110 PRItJT "QOOpet 'exec hello' in operation 


6151- 


85 96 




07 90 


STA »ST 


120 PRINT "Q for upgrade rom - 32k disk 


6156- 


20 21 


F5 


0800 


JSR OPEN ; ROM ROUTINE 


130 PRINT "QQ 








0810 ; 




UO POKE 13,1 


6159- 


20 CI 


61 


0820 


JSR ERRCHK 


150 LOAD "exec hello", 8 








0830 ; 




160 POKE 13,0 


615C- 


A9 02 




0810 


LDA *2 ; SKIP PAST 


170 SYS 6 » 16 T 3 * 1 « 256 


6<t5E- 


8D 7B 


65 


0850 


STA NCHRS ; LOAD-ADDRESS 



March. 1981. Issue lO. 



COMPUTEI 



125 



Professional Business Software 

For The Commodore 32K Microcomputer System 
With 2040 Dual Drive Disk & 2022 Tractor Feed Printer 




General Ledger 



Accounts Payable 



Accounts Receivable 



Payroll 



• Holds Up To 300 Accounts 

• Accepts Up To 3000 
Transactions Per IVlonthi. 

• Cash Disbursements Journal, 
Casti Receipts Journal, and 
Petty Cash Journal for 
simplified data entry. 

• l\/laintains Account Balances 
For Present fvfonth, Present 
Quarler. Present Year, Ttiree 
Previous Quarters, And 
Previous Year 

• Complete Financial Reports 
Including Trial Balance. 
Balance Sheet. Profit & Loss 
Statement, Cash Receipts 
Journal. Cash Disbursements 
Journal, Petty Cash Journal 
and more. 

• Accepts Postings From 
External Sources Such As 
Accounts Payable, Accounts 
Receivable, Payroll, 

Etc 



• Interactive Data Entry With 
Verified Input And Complete 
Operator Prompting, 

• Automatic Application Of 
Credit And Debit t*/emos. 

• Maintains Complete Purchase 
Records For Up To 200 
Vendors. 

• Invoice File Accepts Up To 
400 Invoices 

• Random Access File 
Organization Allows Fast 
Individual Record Updating 

• Multiple Reports Provide A 
Complete Audit Trail 

• Check Printing With Full 
Invoice Detail. 

• Full Invoice Aging 

• Automalic Posting To 
General Ledger ... 



• Maintains Invoice Fi!e For Up 
To 300 Invoices, 

• Accomodates Full Or Partial 
Invoice Payments 

• Customer File Maintains 
Purchase Information For Up 
To 1000 Customers. 

• Allows For Automatic 
Progress Billing, 

• Provides For Credit And Debit 
Memos As Well As Invoices. 

• Prints Individualized 
Customer Statements. 

• Interactive Data Entry With 
FulIOperator Prompting, 

• Complete Data Input 
Verification And Formating 

• Automatic Posting To 
General Ledger .... 



• Maintains Monthly, Quarterly. 
And Yearly Cumulative Totals 
For Each Employee 

• Payroll Check Printing With 
Full Deduction And Pay Detail, 

• Sixteen Different Reports 
Including W2 And 941, 

• Interactive Data Entry With 
Easy Correction Of Entry 
Errors. 

• Automatic Data Verification. 

• Complete Job Costing Option 
With Cumulative Totals And 
Overhead Calculations 

• Random Access File 
Organization For Fast 
Updating Of Individual 
Records 

• Automatic Posting To 
General Ledger 



Structured around the time tested and reliability proven 
series of business software systems developed by Osborne 
and Associates, these programs have been designed to fill 
the need of a comprehensive accounting package for the 
new Commodore PET micro computer system Each program 
can either stand alone, or be integrated with the others in a 
total software system. 

Designed with the first time user in mind, these programs 
lead the operator through step by step, verified data eniry It 
is impossible to 'crash' a program due to operator error or 
invalid data input Design consistency has been maintained 
from program to program to greatly increase operator 
familiarity and confidence. 

Documentation, normally a problem for small systems 
users, IS provided by the comprehensive series of Osborne 



and Associates user manuals. These three manuals together 
total over 800 pages of detailed step by step instructions 
written at three levels for DP Department Managers, Data 
Entry Operators, and Programmers. You don't have to worry 
about getting 'promises' instead of documentation because 
the documentation was written before the programs 
were developed. A second set of manuals details any 
changes required during conversion Each program 
provided on disk with complete documentation Packaged 
in a handsome three ring binder witti pockets and twelve 
monthly dividers for convenient storage of reports 

See your nearest Commodore dealer for a demonstra- 
tion of this outstanding business software system. 



CMS Software Systems 



5115 MENEFEE DRIVE 



DALLAS TX 75??7 



2 H -38 1 -0690 



n& 



COMPUTE! 



March, 1981. Issue lO, 



Program Operation 

As I said earlier, the first program 
on the disk must be SIGNON. 
Thus, after turning on the Pet, key 
the following: 
CLR 4 spaces "*",8 Home RUN 

This causes the first program on 
the disk to be loaded and run. 
Very quickly, you see the com- 
mands which were entered earlier 
using BUILD HELLO, appear on 
the screen. At the end of the 
HELLO file you regain control at 
the keyboard. (Or earlier if one of 
the commands disengages EXEC 
HELLO). 



Program Details 
SIGNON 

This tiny program uses one trick. 
Since a LOAD command issued by 
a program will cause a restart, 
location 13 is used as a flag that we 
are restarting after loading the 
machine-language program. This 
location normally contains a zero. 
BUILD HELLO 
This program does very straight- 
forward text entry. I chose to save 
the HELLO text as a program file 
on disk, so the text is poked into 
memory, and the machine- 
language monitor invoked to save 
the results. The cursor-control keys 
are thus all active, and characters 
such as double-quote and comma 
cannot cause any problem. The 
only checking done in the program 
is to ensure that the text is not too 
large for the area allocated to it in 
EXEC HELLO. 
EXEC HELLO 
The first thing done in EXEC 
HELLO is to count the number of 
characters in the filename. This 
allows the name to be changed by 
poke's without having to re- 
assemble the program. Next the 
error-channel and the text file are 
opened. The error-channel is inter- 
rogated to make sure there is a 
HELLO file on the disk. If not, the 
message 'ERROR* is printed on 
the screen and the program breaks 
into the monitor. The next file is 
read into memory, and both chan- 
nels are closed. The part of the 



6461- 
6863- 
6M66- 
6H69- 
6U6C- 

6J46E- 
6171- 
6173- 
6176- 
6178- 
617A- 

617D- 
6180- 
6182- 
6181- 
6187- 
6189- 
618A- 
618D- 
618F- 
6191- 
6103- 

6195- 
6«98- 
6«9A- 

619D- 
619F- 
61A2- 
61A1- 

61A7- 
51A9- 
61AC- 
61AE- 
61B1- 
61E2- 
61B1- 
61B6- 
fi1B8- 
eiBA- 
61BH- 
61BD- 
filCO- 



6MC1- 
6103- 
61C6- 
61C9- 
61CB- 
61CD- 
61CF- 
61D1- 
61D1- 



A2 08 

20 C6 FF 

20 El FF 

CE 7B 65 

DO F8 

AD 78 65 
85 01 
AD 79 65 
85 02 
AO 00 
8C 7F 65 

20 El FF 
C9 FC 
FO 11 
AC 7F 65 
91 01 
88 

&C 7F 65 
CO FF 
DO EC 
C5 02 
DO ES 

AC 7F 65 

91 01 

20 CC FF 

A9 08 
20 AE F2 
Ag OF 
20 AE F2 

A5 90 
8D E8 61 
A5 91 
8D E9 61 
78 

A9 E3 
85 90 
A9 61 
85 91 
58 

A9 00 
fiD 7K 6^ 
60 



A2 OF 
20 C6 FF 
20 El FF 

eg 30 

FO F9 
09 2C 
DO 01 
20 CC FF 
60 



61D5- A2 13 



61D7- 
6HDA- 
61DD- 
61DE- 
61E0- 
61E1- 
61E2- 



BD 78 61 

20 02 FF 

E8 

DO F7 

00 

00 

00 



61E3- A5 9E 



61E5- 
61E7- 



61EA- 
61EC- 
61EF- 
61F1- 
6MF1- 
61F7- 
61F9- 



FO 03 
')C 00 00 



A5 01 
8D 7C 65 
A5 02 
8D 7D 65 
AD 78 65 
85 01 
AD 79 65 



0660 

0870 

0880 

0890 

0900 

0910 

0920 

0930 

0910 

0950 

0960 

0970 

09 80 

0990 

1000 

1010 

1020 

1030 

1010 

1050 

1060 

1070 

1080 

1090 

1100 

1110 

1120 

1130 

1110 

1150 

1160 

1170 

1 180 

1 190 

1200 

1210 

1220 

1230 

1210 

1250 

1260 

127 

1280 

1290 

1300 

1310 

1320 

1330 

13itO 

135 

1360 

1370 

1380 

1390 

1100 

1110 

1120 

1130 

1110 

1150 

1160 

1170 

1180 

1190 

1500 

1510 

1520 

1530 

1510 

1550 

1560 

1570 

1580 

1590 

1600 

1610 

1620 

1630 

1610 

1650 

1660 

1670 

1680 

1690 

1700 

1710 

1720 

1730 

1710 

1750 

1760 



PASSJK 



CHRGET 



DONE 



COfJECT 



LDX *8 

JSR SETIN 

JSR GET 

DEC WCHRS 

BNE PASSJK 

LDA MYPTH 

STA *PTR 

LDA MYPTR+1 

STA «PTR + 1 

LDY #0 

STY SVY 

JSR GET 

CMP *252 

BEQ DONE 

LDY SVY 

STA <PTR),Y 
DEY 

STY SVY 

CPY lf$FF 

BIJE CHRGET 

DEC »PTR+1 

BNE CHRGET 

LDY SVY 
STA (PTR),Y 
JSR RESCHN 

LDA #8 
JSR CLOSE 
LDA n5 
JSR CLOSE 



LDA »INTHHD ; 

STA GOBACK+1 ; 

LDA «rNTHND + l 

STA GODACK+2 

SEI ; NO INTERRUPTS 

LDA ffL.INTRTN 

STA "IHTilND ; CONNECT 

LDA 9M,INTRTM 

STA *INTHHD+1 

CLI 

LDA SO 

STA SVK 

RTS ; TIIATS ALL FOLKS 



SET INPUT CHANNEL 
FOR TEXT FILE 



SET UP FOR 

INDIRECT 

ADDRESSING 



END OF FILE CHARACTER 



JUMP, OR I'M DEAD 



STORE EOF 
RESTORE CHAtJNEL 



A BIT OF 

ROM IHDEPENCE 



EXEC FILE NOW RUNNING 



ERRCHK 
GER 



LDX il^5 
JSR SETIN 
JSR GET 
CMP #$30 
BEQ GER 
CMP /;$2C 
BriE ERR 
JSR RESCHN 
RTS 



FILE NUMBER 

SET INPUT CHANNEL 

ZERO? 

OK, GET ANOTHER 

COMMA? 

NO - HOST BE BAD 



ERR LDX «ERHSG+256-ERMEND 

; PRINT *ERROH» 

ERLOOP LDA ERHEND-256,X 

JSR PRINT 

I NX 

BNE ERLOOP 

BRK 

BRK 

BBK 



; INTERRUPT ROUTINE 

INTRTN LDA »KBUFKO 

; LAST CHARACTER PROCESSED? 

BEQ SEHCHR ; YUP; 
GOBACK JMP SOOOO 



GIVE HIM ANOTHER 



ABOVE ADDRESS WILL BE FILLED IN 
BY THE PROGRAM DURING EXECUTION 
AS THE NORMAL INTERRUPT HANDLER 



SENCHR 



LDA 
STA 

LDA 
STA 
LDA 
STA 

LDA 



*PTR 

SVFTR 

«PTHtl 

SVFTR+1 

MYFTR 

»PTR 

l■lYFTR^-l 



SAVE 'USR' 
VECTOR 
(PROBABLY 
HAVE TO) 

SET UP MY 
INDIRECT 



DON'T 



March, 19B1. Issue lO, 



COMPUTEJ 



127 



program which feeds characters in- 
to the keyboard buffer is hooked in 
to the interrupt processor, and con- 
trol is returned to BASIC. The in- 
terrupt routine sees if there are any 
characters in the buffer, and if not, 
deposits one. It looks at the text 
being passed, and if the word 
LOAD appears, sets a flag. At the 
end of a line, if the flag is set, then 
the USR vector is pointed at the 
re-connect routine in EXEC 
HELLO, and a SYS added to 
the content of the keyboard buffer. 
At the end of the text everything is 
restored as it was. 

EXEC HELLO tries to be 
transparent to the rest of the Pet, 
so it sits in unprotected memory. 
This means it could be clobbered if 
the commands RUN a program, 
and cause it to process far enough 
to build variables on top of EXEC 
HELLO. Note also the warnings in 
the comments at the start of the 
listing. 



What next 

EXEC HELLO could be modified 
to handle just about any purpose 
where running a program would 
cause problems but direct com- 
mands will work. Several of these 
cases (such as dumping the con- 
tents of a tape to disk) are handled 
by utility programs, but with EX- 
EC HELLO the only thing you 
have to do to handle a new re- 
quirement is to change the direct 
commands on the HELLO file. 
If you wish to obtain a disk 
containing PET EXEC HELLO 
along with a number of other pro- 
grams, please send $12 to the 
author. If you do key il in or send 
for a disk, please give it to all your 
friends. 



64FC- 85 02 
6itFE- AO 00 



6500- 
6502- 
6501- 
6506- 
6509- 
650B- 



B1 01 
C9 FC 
FO 65 
8D 6F 02 
A2 01 
86 9E 



650D- AE 7C 65 

6510- 86 01 

6512- AE 7D 65 

5515- 86 02 



6517- 
6519- 
651B- 
651E- 

6520- 
6522- 
6525- 
6527- 
652A- 
652D- 
652E- 

6530- 
6532- 

6536- 
6538- 
653A- 
653C- 

653F- 
6512- 
65145- 
65'<7- 
65^19- 
654C- 

654F- 
6552- 
65511- 
6556- 
6558- 

655B 

655D 

6560 

6553 

6555- 

6568- 

656B- 
656E- 
6570- 
6573- 
6575- 



C9 OD 
DO sn 
AD 80 65 
FO IF 

A9 00 
8D 80 65 
A2 05 
BD 85 65 
go 6F 02 
CA 
DO F7 

A2 06 
86 9E 
A9 A7 
85 01 
A9 6H 
85 02 
IC 6B 65 

AE 7E 55 
DD 81 55 
FO 07 
A9 00 
80 7E 65 
FO OD 

E8 

8E 7E 65 
EO Oi) 
DO 05 
A9 01 
8D 80 65 



A9 FF 

CE 7f 

- CD li 



65 
65 

DO 03 

CE 79 65 

1C E7 61 



AD E8 
85 90 
AD E9 
85 91 
4C E7 6il 



51 
64 



6578- 00 67 

657A- 

657B- 

557C- 

657E- 

657F- 

6580- 



00 



1C IF 41 
44 



6581 

6581 

6585- 20 53 59 

6588- 53 30 OD 

658B- 2A 45 52 

558E- 52 >i¥ 52 

6591- 2 A 



1770 

1780 

1790 

1800 

1810 

1820 

1830 

1840 

1850 

1860 

1870 

1880 

1890 

1900 

1910 

1920 

1930 

1910 

1950 

I960 

1970 

1980 

19 90 

2000 

2010 

2020 

2030 

2040 

2050 

2050 

207 

2080 

2090 

2100 

2110 

2120 

2130 

2140 

2150 

2160 

2170 

2180 

2190 

2200 

2210 

2220 

2230 

2240 

2250 

2260 

2270 

2280 

2290 

2300 

2310 

2320 

2330 

2340 

2350 

2360 

2370 

2380 

2390 

24 00 

2110 

2420 

2430 

2440 

2450 

2160 

2470 

2480 

24 90 

25 00 
2510 
2515 
2520 



SYSLOP 



NOCR 



CHKLD 



EUCHKL 

BACK 
UNHOOK 

ERMEND 



STA *PTR+1 
LDY 110 

LDA (PTR) ,Y 
CMP #252 
BEQ UNHOOK 
STA KEYBUF 

LDx in 

SIX »KBUFH0 

LDX SVPTR 
STX *PTR 
LDX SVPTR+1 
STX *PTRt1 

CUP *($0D 

BNE NOCR 

LDA LFLG 

BEQ NOCR 

LDA #0 ; 

STA LFLG 

LDX #5 ; 

LDA SYS.X 

STA KEYBUF, X 

DEX 

BKE SYSLOP 

LDX ff6 i 

STX »KBUFNO 
LDA ('L,C0NECT 
STA *PTR ; 

LDA *H,CONECT 
STA «PTR + 1 
JMP UIIHOOK 

LDX SVX 

CHP L0AD,X 

BEQ CHKLD 

LDA HO 

STA SVX 

BEQ EHCHKL ; 

INX 

STX SVX 

C P X /' 4 

BUE EfJCHKL ; 

LDA in 

STA LFLG ; 

LDA i-'$FF 

DEC MY PTR ; 

CMP MY PTR ; 

BNE BACK 

DEC MYPTR+1 

JMP GOBACK ; 

LDA GOBACK+1 
STA «INTHUD ; 
LDA GOBACK+2 
STA *INTHND+1 
JMP GOBACK 



ADDRESS 



END OF FILE? 
YES 

PRETEND IT CAME 
FROM KEYBOARD 

RESTORE 
'USR' VECTOR 



CR? 

KOPE 

DID WE SAY 'LOAD'? 

NOPE 

RESTORE FLAG 

SAY SYSO SOD 



6 CHARACTERS 

; SET UP 

RESTORE 
; HOOK 



; WORK AREA 

MY PTR 

FMLEK 

NCHRS 

SVPTR 

SVX 

SVY 

LFLG 

LOAD 



.SE S6700 

.DS 1 

.DS 1 

.DS 2 

.DS 1 

.DS 1 

.BY 

!bY 'LOAD' 



WATCH 
OUT FOR 

'LOAD' 



JUMP 



WHOLE WORD? 

NOT YET 

SET FLAG 



DOUBLE 
DECREMENT 



SEE YOU SOON 



RESTORE 

INTERRUPT 

VECTOR 



TOP OF TEXT AREA 
LENGTH OF FILE NAME 
II CHARS TO SKIP 
POINTER SAVE AREA 
X REG SAVE AREA 
Y REG SAVE AREA 
=1 : THIS LINE 
CONTAINED A 'LOAD' 



2530 SYS 
2510 ERMSG 



EQUATES 



2550 

2560 

2570 

2580 

2590 PTR 

2600 ; 

2610 INTHMD 



.BY ' SYSO' SOD 
.BY '"ERROR*' 



.DE 1 ; INDIRECT ADDRESS 
. DE $90 ; INT HANDLER 



12S 



COMPUTEI 



March. 1981. Issue lO. 



2620 ST 


.D£ $96 


STATUS 








2630 KBUFNO 


.DE S9E 


li CHARS IN BUFFER 


LABEL FILE: [ / 


: EXTERNAL ] 




26liO OPLEH 


.DE $D1 


LEN OF FILE .^JAHE 








2650 FNUH 


.DE SD2 


FILE NUHBER 








2660 SCIJDRY 


.DE $03 


SECONDARY ADDRESS 








2670 DEV 


.DE $01 


DEVICE NUHBER 


FNAME = 6't0 3 


ENTRY=6417 


SHLOOP=6«19 


2680 FNPTR 


.DE SDA 


ADDRESS OF NAME 


LENFHD=6121 


PASSJK=6166 


CHRGET=647D 


2690 KEYBUF 


.DE S26F 


KEYBOARD BUFFER 


DONE=6195 


C0NECT = 6ilAT 


ERRCHK=6HC1 


2700 








GER:61C6 


ERH=6HD5 


ERL00P::6I1D7 


2710 








IWTRTN = 6LIE3 


GOBACK:6HE7 


SENCHR:64EA 


2720 


TWO IJOK- 


-STANDARD ROM ADDRESSES 


SYSLOP:6527 


KOCR=653F 


CHKLD=65ME 


27 30 








ENCHKL=655B 


BACK=656S 


UNHOOK=656B 


271)0 C 


:lose 


.DE SF2AE 




ERMEI1D = 6578 


HYPTR = 6578 


FNLEN=657A 


2750 C 


)PEN 


.DE $F52't 




flCtlHS = 657B 


SVPTR=657C 


SVX=657E 


27 60 








SVY=657F 


LFLG=6580 


LOAD=656l 


2770 £ 


>ET1N 


.DE $FFC6 


SET CHANNEL 


SYS=5585 


ERMSG=658B 


/PTR=0001 


2780 F 


ESCHN 


.DE SFFCC 


RESET IT 


/INTHNDnOOgO 


/ST::0096 


/KEUFN0=009E 


2790 C 


,ET 


•DE $FFE« 




/OPLEH=O0D1 


/FNUM=00D2 


/SCHDRY=00D3 


2800 f 


RINT 


.DE $FFD2 




/DEV=0OD1 


/FNPTR::0ODA 


/KEYBUF=026F 


2810 




.EN 




/CL0SE=F2AE 
/RESCHtJzFFCC 

//OOOO, 6592, 6592 


/OPEN=F521 
/GET=FFE1) 


/SETIN=FFC6 
/PRINT=FFD2 



100 

1 10 
120 
130 
liJO 
150 
160 

170 
180 

190 
200 
210 
220 
230 



240 
25 
260 
270 
280 
290 
300 
310 



320 
330 
340 
35 
360 
370 
380 

390 

400 
410 
420 
430 



440 
450 

460 
470 



UL = PEEK (59468): 

POKE 59468,14 
PRINT "Si help you create 'hello' 
PRINT "files on disk (drive zero). 
PRINT "Qsorry, i'm not a full text editor; 
PRINT "use 'stop' if you change your mind, 
PRINT "Quse shift @ to signal the end.Q 
SL = 3 * 16 T 3: 
MX = SL + 350 
POKE 170,0 
GET A$: 

IF A$ = "" THEN 
IF A$ = '<§" THEN 



170 
260 



POKE SL, ASC (A$) 

X = FRE (0) 

SL = SL + 1 

IF SL > MX THEN PRINT: 

PRINT "Qsorry, this hello 

too big.": 

POKE 59468, UL: 
STOP 
PRINT A$; 
GOTO 170 

OPEN 15,8,15, "s0:hello" 
CLOSE 15 
POKE SL,252 
SL = SL + 1 
DIM X$(15) 
FOR J = TO 15: 
READ X$(J) : 
NEXT 

INT 

SL 

INT 

SL 

INT 



file is 



(SL / 16 T 3) 
16 T 3 * A1 

(SL / 256) 
256 * A2 

(SL / 16) 



A1 
SL 
A2 
SL 
A3 
A4 = SL - 16 * A3 

PRINT "QQQQQQQQQ.s " CHR$ (34)"0: 
hello"; 

PRINT CHR$ (34)",08,3000, "X$(A1)X$ 

(A2)X$(A3)X$(fl4j 

PRINT ".X" 

PRINT "QQQQQQQ" 

POKE 59468, UL 

POKE 623, 13: 

POKE 624,13: 

POKE 158,2 
SYS 64785 
END: 

REM NEVER EXECUTED 
DATA 0,1,2,3,4,5,6,7 
DATA 8,9,A,B, C,D,E,F 



LOWEST PRICES EVER 

DISKETTES 



VERBATIM 

51/4" SSDD #4443 24.00/1 

SVV'SSDD #1 81 58 w/Hub Ring. . . 32.95/1 

MAXELL 

Syv SSDD #MDIM 36.00/1 

8" SSDD #FD1 1 28M1 200 38.00/1 

MEMOREX 

5y4"SSDD #3401 26,50/10 

SW SSDD #3431 w/HubRing. . . . 29.50/10 

8" SSSD #3060 31.00/10 

8" SSDD #3090 34.00/1 

OTHER TYPES AVAILABLE 
CALL OUR ORDER DESK COLLECT 

(609)829/8553 

COMPUTERWARE OUTLET 

#9 Colonial Square, Cinnaminson, N.J. 08077 



March, 1981, Issue lO. 



COMPUTE! 



129 



Agricultural Software 
from Cyberia™ 



FOR PET/CBM SYSTEMS 



uyDBr'rsrrnGrThe complete 

accounting package for today's farm operations 

■ Records, sorts, combines and prints the results of the farm operation. 

■ Account headings and numbers are pre-assigned for nearly every type 
of farm income or expense, but any account maybe deleted, altered or 
added. 

■ Keeps personal, family and house-hold accounts as well. 

■ Cyber-Farmer management tools include cash-flow analyses, depreci- 
ation schedules, inventory and budget reports. 

■ No computer experience is necessary to operate this system. 




Farrow-Filer" 

Record-keeping and management 
system for the pork producer 

■ Helps the pork producer to low/er their cost-per-pig 
by producing more animals. 

■ High visual impact of reports allows for better 
culling of freeloaders. 

■ Alerts the operator to possible medical problems 
in the herd. 

■ Forecasts farrowings for a 3 month period. 

■ Keeps individual records on each animal. 



Farmer'sWorkbook 

The most powerful management tool ever for the 
agricultural producer. Farmers Workbook combines 
the power of Visicalc" * with the knowledge of a ma- 
jor midwestern university. The Farmers Workbook is 
a collection of templates that are designed to be run 
on the Visicalc® program. The templates include 
lables, formulas, sample data, test cases and full 
documentation. Template titles include: Cattle 
Feeder, Pig Production, Sheep Production, Grain 
Management, Loan Payments, Market Average, Land 
Purchase and many others. 

'Visicalc is a Irademark of Personal Software. Inc. 



Also...Two Other Enhancements for PET/CBIM Systems 




SuperBus 



Greatly multiplies 
system capabilities 



per computer 



This is an active, integrated system— not just a passive network. Super- 
Bus gives schools, banks, laboratories and businesses control of the 
^ way their networks operate. 

Up to 18 computers, disk drives or printers can be interconnected. 
Complete file security (program and data) and BASIC security, 
Built-in error detection and convenience features. 
Can both read and write to disk. 
All BASIC commands can be used. 



Auto-Boot 



Simplifies PET/CBM operation 



^/|Q95 per computer 



1 Auto-Boot is a ROM that automatically loads and runs the first program 

on the disk (initializing if necessary). 
I Completely compatible with most other programs. 
I Just insert the disk in the drive, turn on the computer, and Auto-Boot 

does the rest. 




MasterCard. VISA and C.O.D. orders accepted. Specify computer model wtien 
ordering SuperBus or Auto Boot. Dealer Inquiries Invited. 



^ 



][R] OlnK^ 



515-292.7634 
1 2330 LINCOLN WAY, AMES, IOWA 50010 



130 



COMPUTE! 



March. 1981, Issue lO. 



A Flexible input Subroutine 

Glenn M. Kleiman Research Triangle Park, NC ! 



Many interactive programs require a variety of types 
of input from the user. For example, in my own pro- 
grams written for classroom use by children, each of 
the following four types of input are often required: 

1. Alphabetic strings, such as the user's name or 
answers to questions. 

2. Numbers, such as the user's age or the an- 
swers to math problems. 

3. Single digits or letters from a restricted set, 
such as when the user is asked to make a selec- 
tion from a menu. 

4. Y or N, in response to questions such as "Do 
you want to continue? (Y/N)". 

A program designed for unsophisticated users 
must have checks that the user's input is appropriate. 
For example, the programmer must guard against 
the uncertain user who, when given a Yes/No ques- 
tion, presses M for "maybe". Often, particularly in 
programs to be used by children, one should also 
control the number of characters that can be input. 
A program should not accept a name consisting of 
100 letters, nor should it accept 15 digits in answer 
to a math problem that calls for a 3 digit answer. 
Furthermore, the user should be able to erase 
mistakes, and inappropriate responses should not 
stop program execution. 

I have written a general purpose input sub- 
routine to handle all of the above. It is written for 
the PET, but most of the routine is compatible with 
other BASICs, so it can be easily revised for other 
microcomputers . 

Within a program using this subroutine, the ac- 
cepted inputs are specified by assigning values to 
variables before the subroutine is called. The main 
variable is UF, which can have any one of four 
values. If UF =0 (the default value), any letters, but 
no other characters, will be accepted. If UF = 1 then 
only numbers will be accepted. For both letters and 
numbers, UM controls the maximum number of in- 
put characters. The default value for UM is set to 1 
in line 300. 

In order to restrict the accepted characters, as 
for menu selection responses, UF is set to 2, and the 
first and last characters to be accepted are assigned 
to variables F$ and L$, respectively. For example, 
the following line in a program will set the 
subroutine to accept only the letters M,N,0, and P: 
UF = 2:F$ = "M":LS = "P":GOSUB300 

Finally, to accept only Y or N, UF is set to 3. If 
UF =2 or 3, UM is set to 1 automatically. 

In all cases, inappropriate input is ignored. Input 
characters can be erased by pressing the DEL key 
and a completed input is signaled by pressing 
RETURN. DEL and RETURN are not accepted 



until at least one character has been input. Once 
UM characters have been input, only DEL and 
RETURN will be accepted. 

When RETURN is pressed, UF and UM are 
reset to their default values. Input strings are then 
available in the program as variable INS, input 
numerics as IN. | 

A few other notes. I use a flashing ? as a cursor, 
but any character can be substituted in line 420. In 
line 430, UT =TI -1-35 controls the rate of cursor 
flashing. The flashing rate of 35 jiffies is slower than 
most cursors, but seems to be less anno)'ing to many 
people than the usual speed. The technique of flashing 
the cursor is based on the INP routine fnim CURSOR 
#4. This subroutine, and any other frequently u.sed 
one, should be placed at the beginning oi' the pro- 
gram. The reason is that whenever a GOSUB (or a 
GOTO) occurs, the sequential search for the 
referenced line number begins at the first line of the 
program. An input subroutine placed at the end of a 
long program may be noticeably slow in accepting 
responses. 

This subroutine, written to be easily readable 
rather than compact, uses 406 bytes (without the REMs). 

FLE:;IELE INFUT SUBF-OUTItlE I 



lae REM 
ten REM 

102 REM 

10J f:em 
104 RER 
leS REM 

106 REM 

107 REM 
lie REN 
120 REM 
13S REM 
140 REM 
150 REM 
1S0 REM 
170 REM 
180 REM 
190 REM 
200 F:EM 
2113 REM 



i;2a 
2'JQ 
240 



REM 
REM 
REM 



BLEtiH M. KLEIMFltl 

tehchimg tools 
microcomputer sef:'v'ices. 

P.O. BOX 12t"79 1 

resehrch trif^hC'LE paFi; ' 

.M.L. 27709 

VRRIRELES TO BE bET 
UF=S FOR RLF'HhEETIC IHPUT 
UF=1 FOR NUMERIC INPUT 
UF=2 FOR RESTRICTED IfJPUT 
UF=3 FOF: V OR 11 INPUT • | 

IF UF=0 OR 1 SPECIFY 

UM = MflXIMUM HUMEER OF INPUT CHfiRRCTER::. 

aiEFflULT UM SET IH LINE 300 > 
IF UF=2.. SPECIFV- I 

F$=FISt'ST CHFiRhCTER RCCEPTED I 

L*=LRST CHHRaCTER hCCEPTEH 



250 REM, 

260 REM 

270 REM 

280 REM 

300 IFUM=i3THEHUN= 

310 IFUF=0THEHF*= 

320 IFUF=1THEHF$= 

330 IFUF>1THEHUM: 

340 IN*="";UT=TI 

403 GETU* IFUfO' 



OUTPUT VfiRinELES 
im - INPUT STRING 
IN = VFlLdHf;' 



■1 

1 

UC=1 
ji;iT0440 



410 IFUT>TIGOTO400 
420 PRINTMIBt!;" ?".. UC i;' , "*-", 
430 UC=3-UC ■■ UT=T I+JiS ■ G0Tu4riH 
440 UL=LE1-I<IN*:) • IFUL=UIiHriT05lH 

I FIJFO3GUTU4S0 

I F\Jt-= " V "ORU*= "N " 00TG490 
470 GOTOSOO 

4S0 I FU*<F*ORU*>L$GOTCi'=ifiO 
490 IHJ-=IN3:+U$ PRINTU*; :GOTO40H 

IFUL=OGuTO400 

IFU*=CHR*<20::.THENIH*=LEFTI:aN$,IJL-l.': PRINT" 

I FU$ ;:;;CHR3: < 1 3 :■ oi:iTu4ti0 

" : UF=ii : UM=0 : IN='-,.'FiL C IN* > ■■ RETURN 



450 

460 



3HM 
510 

520 



530 PRINT 
RERD' 



Morch, 19S1 Issue lO- 



COMPUTE! 



131 



Skylcs Electric Works 




QYour students are gathering around the several PET computers in your 
classroom. And they all are hungry for hands-on turns at the keyboards. 
Some students are just beginning to understand computers; others are 
so advanced they can help you clean up the programs at the end of the period. 
How do you set up a job queue, how do you keep the beginners from crashing a 
program, how do you let the advanced students have full access? And how do you 
preserve your sanity while all this is going on? 

A. With the Regent. 
Q. What is the Regent? 

A The ultimate in classroom multiple PET systems. A 
• surprisingly inexpensive, simple, effective way to have 
students at all levels of computer capability work and learn 
on a system with up to 15 PETs while the instructor has 
complete control and receives individual progress reports. 

Up to 15 PETs. one dual disk drive and as many as five 
printers can interface with the Regent, and do all those good things we promised. It's designed to operate with 
8K, 16K. 32K PET/CBM models and with the Commodore disk drives and new DOS. 




Five levels of user privilege, from the Systems Level, 
through Levels One and Two, Student: Levels One and 
Two. Operator. From only the use of system commands 
to complete control for the exclusive use of the 
instructor 

There's complete system protection against the novice 
user crashing the program; the instructor has total 
control over, and receives reports concerning, usage of 
all PETs. 

A complete set of explanations for all user commands 
is stored on the disk for instant access by all users. 
And a printout of the record of all usage of Regent is 
available at the instructor's command. 

The Regent includes a systems disk with 100.000-plus 
bytes for program storage, a ROM program module, 
together with a Proctor and a SUB-it . . . and complete 
instructor and student user manuals. 

Q. SUB-H? Proctor? What are they? 

A The SUB-it is a single ROM chip (on an interface 
**• board in the case of the original 2001-8 models) 
that allows up to 15 PETs to be connected to a 
common disk via the standard PET-IEEE cables. The 
Commodore 2040. 2050 or 8050 dual disks and a 
printer may be used. 

(The SUB-it has no system software or hardware to 
supervise access to the IEEE bus. The system is thus 
unprotected from user-created problems. Any user- 
even a rank novice— has full access to all commands 



and to the disk and bus. This situation can, of course 
be corrected partially by the Proctor, completely by the 
Regent.) 

The SUB-it prevents inadvertant disruption when one 
unit in a system is loading and another is being used. 

The Proctor takes charge of the bus and resolves 
multiple user conflicts. Each student can load down 
from the same disk but cannot inadvertently load to or 
wipe out the disk. Good for computer aided instruction 
and for library applications, offering hundreds of 
programs to beginning computer users. 

A combination of hardware and software protects the 
disk from unexpected erasures and settles IEEE bus 
usage conflicts. Only the Instructor or a delegate can 
send programs to the disk. Yet all the PETs in the 
system have access to all disk programs. Available for 
all PET/CBM models. SUB-it and PET intercontrol 
module and DLW (down-loading software) are included. 



Q- 

A. 



How expensive are these classroom 
miracles? 



We think the word is inexpensive. The Regent 
system is $250 for the first PET: S150 for each 
additional PET in the system. The SUB-it is S40. (Add 
an interface board at S22,50 if the PET is an original 
2001-8.) And the Proctor is 595. 

There are cables available, too: 1 meter at $40 each; 
2 meter, S60 each; 4 meter. $90 each. 




Phone or write for information. We'll be delighted to answer any questions 
and to send you the complete information package. 



Skyles Electric Works 



231 E South Whisman Road 
Mouatain View, CA 94041 
(415) 965-1735 



IS 



COMPUTE! 



March. 1981. Issue 10, 



Universal Tape 
Append 
For PET/CBM 

Roy Busdiecker 
Wood bridge, VA 

Many times we run into the situation where we'd 
like to combine programs which have been SAVEd 
separately. Typical examples include subroutines 
which can be used in many different programs; in- 
terest calculations for mortgage, loan, or savings pro- 
grams; complex arithmetic for math or engineering 
programs; and sorting routines ibr data processing 
applications. 

Owners of Commodore PET/CBM 2001-series 
computers have several alternatives. Several firms of- 
fer a plug-in ROM {read-only memory) in the $50 to 
$100 range, which adds an APPEND command to 
the normal instruction repertoire. 

The program described here allows owners of 
Version 1 (BASIC 2.0), Version 2 (BASIC 3.0), or 
8000 series (BASIC 4.0) PET/CBM computers 
automatically to combine two or more programs 
which were saved on cassette from either one of those 
two computers. 

In use, the program is extremely simple. First, 
LOAD this APPEND program from its cassette. 
Next, take the APPEND cassette out of the recorder, 
and replace it with the cassette that has the first pro- 
gram you want to append to it. DO NOT LOAD 
the second cassette, but RUN the APPEND program 
that is already in the computer. You'll be instructed 
to "Press Play on Cassette #1", and once you do 
that, the program takes over. After the first program 
has been added, take out the cassette and insert the 
second one you want to add. When you RUN the 
APPEND program again, it will once more ask you 
to "Press Play. . .", then add the second program at 
the end of the first. After you've combined all the 
programs you want to join, delete the BASIC Ap- 
pend routine (type each line number, through 29, 
pressing 'RETURN' after each), and use the BASIC 
SAVE command to store the combined version. 

Preparing Programs to be Combined 

A few rules must be observed with regard to the pro- 
grams which are to be joined. In general, you must 
assure that there is no overlap in line numbers bet- 
ween the two (or more) programs. For example, if 
you have two programs where one contains lines 
numbered from 100 to 500 and the other contains 
lines 300 to 700, the computer's operating systeni 
will not react 'normally' if the two are appended. An 
easy 'fix' is to renumber one program or the other. 



so that none of its line numbers fall in the range of 
numbers used in the other program. An exception to 
this rule is the Append routine itself, because it will 
be deleted before you start using the combined pro- 
grams. 

When programs arc appended, the one(s) with 
lower line numbers should be done first, to avoid 
problems. 

Some programs, especially those prepared com- 
mercially, were SAVEd from the Monitor rather 
than BASIC, and contain machine language instruc- 
tions ahead of the BASIC routines. These may not 
be combined using this program unless the BASIC 
and machine language sections are "broken apart" 
and stored separately. You may be able to figure out 
how to do this by careful study of this article and 
some experimentation . . . but be sure that you have 
backup copies of everything critical before you start! 
If the APPEND program detects one of these 
(relatively unusual) programs, it will give you an 
error message and stop without trying to do the 
APPEND. 

As long as you have sufficient room left in the 
computers free memory, you may keep adding pro- 
grams. If you try to add a program which requires 
more than the remaining free space, the program will 
print an error message and not attempt to APPEND, 

How the Program Works I 

Actually there are two separate programs which work 
together to do the job. The first (Figure 1) is a 
machine-language routine, loaded in the second 
cassette buffer, which inspects the program in the 
BASIC text area and calculates where the BASIC 
program ends. 



c* 



PC IRQ SR nc m VR SP 

C6FE E62E 3fl 9£ 36 34 Ffl 

033fl BS 08 R9 01 8Ii 55 03 69 

0342 01 SD 4F 03 R9 04 SD 50 

034H 03 SB 56 03 hiri E9 03 F0 

0352 18 flfl fill E8 08 8D 55 03 

035H 69 01 Sn 4F 03 Sfi SB 56 

0362 03 63 00 SB 50 03 4C 4E 

036n 03 HB 55 03 SB 3h 03 flE 

0372 56 03 SB 3E 03 60 FE E7 



Figure la. Machine Language Program Listing (Monitor 
Version, for entering in computer). 



The BASIC Append routine (Figure 2) uses the 
machine-language routine to find the end of the cur- 
rent program in memory. Then it uses one of the 
built-in ROM (read-only memory) routines to find 
the "header" on the cassette tape at the beginning of 
the SAVEd program. That header contains the start- 




FLOPPY DISK FOR PET 



announcing 



I p[giaisK 1 1 1 



Introductory Special 

$595.00 

Controller Board, DOS, 
40T Disk Drive & Cable. 



Pedisk 1 1 is a small floppy disk controller board that plugs into a ROM socket in your connputer. The board contains all the logic required for a disk 
system as well as space for ROM. It is used with standard 5%" or 8" disk drive/power supply housings to form a fast, reliable and inexpensive mass 
storage system. The CRS/PDOS software package provides simple yet sophisticated file handling. The extended command set can be executed 
directly or from a program: LOAD, RUN, SAVE, OPEN, CLOSE, INPUT and PRINT. 

RELIABLE - single chip disk controller using IBM 3740 recording 



FAST - loads programs at least 3 times faster than 2040. It is the 
fastest disk available for PET. 

SOPHISTICATED ^ The CRS/DOS op system provides advanced file 
handling, indexed-sequential, but very easy to use. 

PEDISK II CONTROLLER BOARD $229.00 

CRS/PDOS M DOS PACK $ 75.00 

40T DISK DRIVE-HOUSING $395.00 

PEDISK II MANUAL S 10.00 



format gives maximum timing margins — super reliability. 
COMPATIBLE — reak diskettes from other systems - 6502PDS, 
AIM, SYM, and even RADIO SHACK (special software). IBM 3740 
soft sector single density. 

IVIPI B51 DISK DRIVE (40 track) $269.00 

DISK CABLE (2 drive) S 35.00 

B'A" DISKETTES {box of 10) S 29.95 

PEDISK n DIAGNOSTIC ROIV! S 29.95 



NEED MORE ROM ROOM? meet SPACEMAKER II 

Switcli between one of four ROIVIS - software controllable. 

IVlix and matcli - ROlVlS, PROMS and EPROIVIS; 2332, 2732, 2532, 2716, etc. 

Vertical mount, put several Spacemakers in adjacent sockets. 

ROIVIDRIVEB 



SPACEMAKER I 



$39.00 



Spacemaker II is a small p.c. board containing four ROM sockets. It 
plugs vertically into any ROIVI socket in a new PET. The user can 
sw/itch between any of the four ROMS manually or under software 
control using ROMDBIVER or USER I/O. 

ROIVI I/O $9.95 

ROM I/O is a special utility control software package for ROM- 
DRIVER owners allowing software controlled switching of ROMS. 
The package includes menu-driven selection of ROMS and an "editor" 
to add or delete entries - complete control directly from your 
keyboard. Available on Commodore or PEDISK diskette. 

I full FORTH + 1 

INTERPRETER — can be executed directly in an interpretive mode 
to speed testing and debugging. 

CROSS-COftrtPILER - words can be individually compiled and tested, 
the entire program can also be cross-compiled for maximum efficiency. 

COND. ASSEMBLER - Machine language modules can be intermixed 
and condilionally assembled to fuMFORTH. 



$39.00 

ROMDRIVER is an accessory parallel output port used to control 
Spacemaker ROM selection without using the User Port of the PET. 
The small p.c. board plugs inside the PET and is connected to 
Spacemakers with jumper cables. 

USER I/O $12.95 

USER I/O allows software control of Spacemaker utilizing the PET 
User I/O port. A connector with specially designed jumpers and the 
diskette with control software "SPACECTL" is provided. Available 
on Commodore or PEDISK diskette. 



FULL FEATURE "FORTH" FOR 6502 SYSTEMS 

STRING HANDLING - variable length constants and variables are 

allowed. Processes compare, move, concatenate and sub-string words. 

FLOATING POINT - process 5 or 9 digit integer and floatmg point 

numbers for arithmetic operations. 

SCREEN EDITOR - contains a unique full cursor visible screen 

editor. 



SPECIFY PEDISK, 6502PDS, COMMODORE 2040 DISK $65.00 



c 



J! 



6502 PROFESSIONAL DEVELOPMENT SYSTEM 



6502PDS: MINI ■ • $2695.00 

The 6502 POS is a versatile multi-card microcomputer designed and programmed for professional engineering and program development work, 
scientific computing, and general processing. This system provides the maximum in capability at the lowest possible cost by utilizing she industries 
must widely used computer bus - the S100. With a choice of over 500 peripherals including telephone interface, speech synthesizers, vocoders, and 
even associate memory, the potential end use is unlimited. The 6502 PDS is housed in a sturdy SI 00 mamfrain containing the 6502 MPU, Multiple 
I/O Card, RAM, and Disk Controller Board. This leaves room for future expansion. The system can be connected to any RS232 terminal or used 
with the optional internal Video Board. 

FOR INFORMATION, SEE YOUR DEALER OR: 



rMICROTECHl 



P.O. BOX 102 • LANGHORNE, PA 19047 • {215) 757-0284 



• PET IS A REGISTERED TRADEMARK OF COMMODORE. 



134 



COMPUTE! 



March. 1981. Issue lO. 



033C 


flS 


01 




LnR 


#*01 


033E 


tin 


55 


03 


3TR 


$0355 


0341 


69 


01 




Rnc 


tt$0i 


0343 


sn 


4F 


03 


STR 


$034F 


0346 


fl9 


04 




LnR 


#$04 


034S 


sn 


50 


03 


STR 


$035ti 


034E 


SD 


56 


03 


STR 


$0356 


034E 


fill 


B9 


0S 


LnR 


$0SB9 


0351 


F0 


18 




BEQ 


$036B 


0353 


Rfl 






TAX 




0354 


fill 


BS 


0S 


LnR 


$03ES 


0357 


■3l\ 


55 


03 


STR 


$0355 


035fl 


€S 


01 




RDC 


#$01 


035C 


sn 


4F 


03 


STR 


$034F 


035F 


Sfl 






TXR 




0:-:fi0 


sn 


56 


03 


STR 


$0356 


0363 


69 


00 




Rnu 


#$00 


036^ 


sn 


50 


03 


STR 


$0350 


036S 


4C 


4E 


03 


JMF' 


$034E 


036B 


Rn 


55 


03 


LDR 


$0355 


036E 


isn 


3R 


03 


STR 


$033H 


0371 


Rn 


56 


03 


LnR 


$0356 


0374 


sn 


3E 


03 


STR 


$033E 


0377 


60 






RTS 





Figure lb. MuchiiK; Lmiguagc Program (Disassembly Listing) 



ing and ending addresses from whkh its program 
was sa\'ed, and knowing those values allows us to 
calculate the length of the program on tape. 

Armed with knowledge of the end ol" the current 
program in memory, and the length of (he program 
to be a])])ended, we can calculate new starting and 
ending locations for loading the program from tape. 
By changing those values before we bring the pro- 
gratn in from the computer, we can start loading the 
new program right where the old one ends. 

Complications , 

Back when there was only one operating system (set 
of ROMs) for the PET, the APPEND routine was 
much simpler. The second version (BASIC 3.0) 
made several changes which increased the challenge 
in designing an APPEiND program to run on either 
version and APPEND a tape which had been created 
on either version. Appearance of BASIC 4.0 in the 
8000 series complicated matters further. There are 
now nine possible combinations, as depicted in 
Figure 3. 

The first problem, and most obvious, is that the 
various "built-in" routines used by the program are 
in different locations in the two versions. I''urthcr- 
more, some "li.xiiig-up" which is done automatically 
in BASIC 2.0 by the tape load routine requires calls 
to other routines in BASIC 3.0 and 4.0. A summary 
of these differences is shown in Figure 4. 



ti REM-SUPER RPPEND-FGR PET.-'CEM.. COFVRIGHT iJCT 79 EV RuV EUSDIECKER 

1 P=256 - S VS82iE: ^ PR I NTPEEK ■:; 826 > +P*PEEK ( 827 > : P V=PEEK ( 56003 ) : PR I HT " lUlMSiHilBW" 

2 nnsUE 1 2 ■ R 1 =PEEK ( 326 ) +P*PEEK ( 327 > - 1 : h2;;=R 1 /256 : R3=H 1 ~P*H2;-; : I FP V= 1 fiPtT HEN 1 k 

3 0NP'v'+1GliTO14.. 15 

4 P=256 : E 1 =PEEK ( 635 > +pit!pEEK ( 636 > ^ E2=PEEK ( 637 ::■ +Pi+iPEEK ( 63f^ ■' ■ I FPEEK ■;■ S~<f. ':• ■■">4THEN27 

5 IFPEEK(635)=yTHEH8 

6 I FPEEK ( 635 > = 1 THENfl 1 =R 1 + 1 : R2";=R 1 ,-'256 ■ fl3=R 1 -P*fi2;; : GuTuS 

7 GuTn27 ' 

8 E3=E2-E 1 +fl 1 : C 1 ';=B3,-'256 : l:2=E3-P*l: 1 K ■ PUKE635 .. R3 ■ PuKEbSb .. R2;-; : pnKEH^;-:7 . f: 2 

9 PUKL633 .. C 1 ;-M PC 1 'OPEEK i 53 ) ORG 1 ^^PEEK ( 53 > RHDC2>=PEEK c =12 :■ THEH2'h 

10 IFPV=16eTHEH23 

11 uHPV+lGGT0i7.- 18 

12 IFPV=160THENPLiKE158. 9 ■ ELI=623 ■ PLiRI^BUTuEU+y : PDKEI .. 13 ■ NEI^^T : RETI IPN 

13 PliKE525-PV*367,. 9 ■ EU=527+PV*96 : FORI^EUTuEU+S ■ FGKEI .. l.-i : NEXT ■ PETI !PN 

14 FKIHT"StS62S94:«(!M!!MsM" T'RIHT''G0T04TTTTTTTTTTTTTT1'' :ST0P 

15 PRIHT"S'T'Sb2S86:!l?M?MPM" : PRIHT"GnT04: 1 U 11 11 H I H 1 1 ]" :STnp 

1 6 PR I NT " S VS62949:pMfM?IpM" : PR I HT "GriTi:i4 : 1 1 1 1 11 1 1 H 1 1 ! I ] " ■ '?■ Tnp 

1 7 GOSUE 1 2 : PR I NT " ;!!l(!l[!M«B'T'3624ti:5 " : F'R I NT " TTTTTTTTT]" : STOP 

1 8 G0:E;IJE 1 2 ■ PR I NT " :BMflMii!JB'T'£;623y::::?I[!M" : PR I WT " GOTO 1 9TTTTTTTTTTm" : STOP 

19 SVS50242 I 

20 SVSS28 

2 1 pnKE42 .. PEEK c 826 > +2 ^ PUKE44 .. PEEK ( 326 > +2 : F0KE4b .. PEEK < 826 ) +2 

22 P0KE43.. PEEK (827) ^ P0KE45.> PEEK (827) ^ P0KE47.. PEEK t' 827:' : END 

23 GOSUB 1 2 : PR I NT " :(!lSMi!l!!fc;'T'S62456:BH!W" : PR I HI " 001024 ! 1 1 1! 11 1 1 1 1 1 1 ] " ■ sTnR 

24 SVS46262 

25 SVSS28 

26 GOTOzl ! 

27 PRINT":p]:£RRnR." TRPE TO EE RPPENDEn 13 NOT R SIMPLE ER8ir: PPOnpRM. " 

28 PRINT"NflCHIHE-LRNOURGE SEGMENTS MUST EE SRVED hEPhRRTELV. " ■ END 

29 PRINT":flEERRuR.l NOT ENOUGH MEMORV SPRCE LEFT TO RPPENB THIS PRuGRfiM. " : ENH 

Figure 2. BASIC Program Listing . 



March, 1981. Issue lO, 



COMPUTE! 



135 



flPFENO Prosran 
running on 


Tap* SfiUEd 


Utfsion 1 PET 
CBfiSIC 2. 0> 


tJeriion 1 PET 
Uersion 2 PET.- CBM 
8000 S»ries CBM 


Uersioo 2 PET--CBn 
■.BfiaiC 3.0) 


U.riior. 1 PET 
UfPilon 2 PET-CBM 
eOOO S.rl.t CBM 


8000 S«.ies CBM 
(BASIC 4. 01 


U»riion 1 PET 
Uersion 2 PET.'CBM 
8D00 Serif* CBM 



Figure 3 



BRSIC 2.0 


BASIC 3.0 


episic 4. 


Rout 1 n* 


SYS 62S94 


SYS 62886 


SYS 62949 


Find rrovrMn h#ad*r 


SYS 62403 


SyS 62393 


SYS 62456 


Lo*d rroflr^rt 


* 


SYS 50242 


SYS 46262 


Pi!< ch»inin» of fmsran 
1 1 nk poi nt *r« 



'done automatically by BASIC 2.0 "load program" routine 
Figure 4. Differences in Built-in Routines 

One oihcr diflbrcnce is that on BASIC 3.0 & 4.0 
machines, it is necessary to reset the pointers for 
variable storage to the new end-of -program. This fix, 
too, was cJonc by the "Load program" routine on 
BASIC 2.0 machines. 

Alignment 

More subtle is the problem of properly aligning the 
appended program to the one already in the com- 
puler. V'crsion 1 PETs .start the SAVE process at 
location 1024 (0400 in hexadecimal notation), which 
lortunately always contains a zero. BASIC 3.0 & 4.0 
PET/CBM computers, on the other hand, start 
SAVEing at location 1025 (hexadecimal 0401). 

At the end of each line of BASIC program text, 
there is one byte which contains a value of zero to 
mark the place (not the same as the ASCII character 
zero, which is stored as a value of 48). Following 
each of these line-end markers, except the last one, 
are two bytes containing a line pointer, then two 
bytes containing the value of the jarogram lino 
number. The last line-end marker is followed by two 
zero-value bytes, so this series of three zero-bytes 
may be thought of as an end-of-program marker. 
Figure 5 illustrates this scheme. 

1024 1025 



Figure 5 






t ext 





t *x.t 


text 












ffnd of prosran 



Focusing in on the end-of-program area. Figure 6 
shows how each of the two types of SAVEd program 
must be lined up with the program in the machine, if 
a successful APPEND is to occur. Notice that the 
leading byte of the BASIC 2.0 tape (which is always 
zero since it originated in byte 1024) can be overlaid 
on the last end-of-line marker, since both values are 
zero. All we have to do, then, is detect whether the 



Every PET 
Needs a Friend. 




CURSOR is the best friend your Commodore PET will ever 
have. Since July, 1978 we have published 150 of the most 
user-friendly programs for the PET available anywhere. 
When we write or edit a program, we spend lots of lime 
fussing about how it will treat you. We pay attention to lots 
of little things that help make using a computer a pleasure 
instead of a pain. 

Naturally, CURSOR programs are technically excellent. 
Each program that we purchase is extensively edited or re- 
written by a professional programmer. But imaginaf/on is 
just as important as being user-friendly and technically 
good! We delight in bringing you off-beat, unusual 
programs that "show off" the abilities of your PET or CBM. 
CURSOR is user-friendly, technically great and full of 
imaginative programs. And every issue of CURSOR is still 
available! We continue to upgrade previously published 
programs so that they'll work on the three varieties of 
Commodore ROM's (Old, New, and 4.0). New issues also 
work on the 80 column CBM. 

For only $4.95 you can buy a sample issue and judge for 
yourself. Or send $27 for a six-issue subscription. Each 
CURSOR comes to you as a C-30 cassette with five 
programs and a graphic Front Cover, ready to LOAD and 
RUN on your PET. 

Who knows? After your PET meets CURSOR, things may 
never be the same! 



Published By: 



Dhtributed by: 
AUDIOCIMC Lid. 
P. O. Boj 88 
Reading, Berkshire 

SYSTEMS FORMULATE Corp. 
Shin-Makicho Bidg.. 1-8-17 
Y^esu. Chuo-Ku. Tokyo 103 



theCODE 
WORKS 



Box 550 

Coleta, CA 93116 
805-603-1585 



T36 



COMPUTE! 



March, 19SI l55ue lO. 



program was SAVEd on a BASIC 2.0 or BASIC 3.0/ 
4.0 machine, and adjust the location for starting the 
LOAD, if necessary. 



Pr oar 



an in 5^ t*xt 






LPl 


LP2 


text 


/ 














LPl 


LP2 


text 


( 



SfiUEd ori BflSIC 2. 

SfiUEd on BASIC 3.0 or 4.0 

Figure 6 

Determining Source 

When the tape header is found, the starting and 
ending locations of the SAVE operation which 
created the tape are retrieved and stored in decimal 
locaiions 635 through 638 (hexadecimal 027B-027E). 
The starting location is in the first two bytes (low 
order byte first, followed by high), and the ending 
address is the last two. If the SAVE was done by a 
BASIC 2.0 computer, then the starting address in 
location 1024 (0400 in hexadecimal notation), which 
636 would contain values of 1 and 4 respectively, 
after the header was found. 

Byte 635, then, holds the key, A \'alue of zero 
indicates a BASIC 2.0 SAVE, while a value of one 
indicates BASIC 3.0 or 4.0. The test for this value is 
in lines 4-6 of the program. Figure 2. If byte 635 
contains neither nor 1, or if byte 636 contains other 
than 4, then the routine on the tape is not a 'normal' 
BASIC program, and special steps must be taken 
before it can be appended. 

Entering the Program 

While the BASIC portion of the program may be 
typed in quite simply, the easiest way to enter the 
machine language segment is to use the monitor, so 
it is a good idea to do that part first. 

If you are using a BASIC 2.0 PET, it will be 
necessary to load the monitor from tape, then tell it 
to RUN. On the newer 2001 scries computers, simp- 
ly enter SYS 64785. On the 8000 series, enter SYS 
54386. Either machine will then give a display of 
register contents, sitnilar to that at the top of Figure 
1, a dot at the beginning of the current line, and the 
cursor just after the dot. 

Simply type in the locations and contents as they 
are shown in Figure 1 , ending each line with a car- 
riage return. When you arc finished, type 
M 033A 0377 

and press 'RETURN', and your entries will be 
displayed so you can check them. Should any 
mistakes be found, simply move the cursor to the ap- 
propriate location, type in the correct value, and 
press 'RETURN' to correct them. 

When you are satisfied that the program has 
been entered correctly, enter X, and the monitor will 
transfer control back to the BASIC operating system. 

Before you start typing in the BASIC part of the 
program, if you are using a BASIC 2.0 PET, be sure 
to type NEW to clear out the monitor. 



Saving ttie Program 

When both programs have been entered, be sure to 
SAVE a copy (or two) for security, to avoid the em- 
barrassment of discovering a machine language error 
by losing control of the computer. 

In BASIC 3.0 enter SYS 64785, or in BASIC 
4.0 use SYS 54386, to return to the mcmitor. Then 
enter 

S "APPEND", 01, 033A, 08BA 

You will get the standard "Press Play and Record" 
messages. When you're fini.shed, enter X to return to 
BASIC. 

On Version I machines, enter I 

POKE 247,58:POKE 248,3:POKE 229, 186:POKE 230,8 
then enter SYS 63153. A .second copy may be saved 
by simply entering SYS 63153 again. 

Testing I 

To see if the program works correctly, first LOAD 
one of the copies you have just made (if you've done 
any SAVE or VERIFY, you'll always have to do 
another LOAD to make the program work correctly. 

Then remove the APPEND tape from the 
cassette unit, insert a tape on which another program 



1 024 - 

; 04005 



Machi n? 
Rou 1 1 1-1 



BfiilC 
Append 
Rout i ri 9 



rii..;Ki ,■,<■ 
R ou F 1 n e 



EfillC 
Fl F F * nd 
R out i n * 



Pr-^03 r .art 



M a c K I i-i €' 
Lari?'j.=i3e 


L 3 fl ^U 3 3 ? 






BR I-IC 
FiF F fi-id 
Rout i n^ 


BFi'.rc 

Rf F^.-id 
F-l'ju t 1 ne 




Us-^r 
F'ra9r iif-i 


F 1 r = t 


F 1 n t 

Hddi ' I on 


"EilF fJ " 


Fiddi 1 1 on 


"Enf^ ■'" 



IJifr 
Pr 03r = 



Fir-t 
fidd 1 ' 1 :■ I 



S r C C- Od 

Rddi t !.:,,■ 



Figure 7. Allocation of Memory during Append 
Operations 

a. At beginning of proccs.s, append program loaded 

b. After User Program has been appended 

c. After first addition to User Program i 

d. After second addition to User Program I 

e. End of process, after append routine is deleted 



A BRILLIANT FUTURE FOR YOUR AIWI-65 WITH THE BANKER MEMORY 



^r^ 



''«*:^*^- 



>'•■ % 



^•'^^* 







TM 










; 



,/v- , ■ * Your 36K of free address 

" space is the AIM's most 

■- ■ ' valuable and limited re- 

f f • - :. ; "\ • ' ■ * source. With today's large 

/ ' ' "?"■' capacity RAM boards, ROM 

- • . . boards, disk systems, video 

» • * _ boards, and other expansion 

' • accessories it is easy to deplete 

• . tfiis resource before the applica- 

tion requirement is satisfied. MTU 
has solved this problem. 

THE BANKER MEMORY contains 32K of RAM, 4 PROM sockets for 2716/2732/2332, a PROM programmer, 40 bits of parallel 
I/O and 4 timers from two 6522 I/O chips. Addressing is extremely flexible with the RAM independently addressable in 4K 
blocks, PROM'S independently addressable, and I/O addressable anywhere on a 64 byte boundary (even m AIM s i/O area at 
AXXX by adding a single jumper to the AIM). 

This may sound familiar, but read on! Unlike other AIM compatible memory boards, THE BANKER MEMORY has on-board bank- 
switching logic! The four 8K blocks of RAM plus the 4 PROM sockets make up 8 resources, each associated with a bit in an 
Enable Register Through this Enable Register resources may be turned on and off under software control. When a resource is 
off its address space is freed for other uses. You can even put BANKER resources at the same address and switch among them 
for' virtually unlimited RAM and PROM expansion! You can even have multiple page zero's and stacks! Do you need 160K byte ot 
memory? It only takes 5 of THE BANKER MEMORY boards and you end up with 5 page zeros and stacks to boot! 

There's more' The BANKER MEMORY also incorporates 18 bit addressing which allows for the 256K address spaces of the 
future RAM, PROM, and I/O each has its own full 1 8 bit address decoder which allows these resources to be in different b4K 
banks This board and other MTU products, such as our 320 by 200 dot VISIBLE MEMORY and Floppy Disk Controller with 16K 
DMA RAM, can turn your AIM into a truly powerful 6502 computer that far surpasses the packaged systems m functional 
performance. 

INTRODUCTORY SPECIAL K-1 032-1 32K BANKER MEMORY FULLY ASSEMBLED AND TESTED $395.00 ($450.00 as of 
March 1 , 1 980) or the K-1 032-2 1 6K RAM only with bank switching and 1 8 bit address bus only $295.00 
Isn't it time you took a closer look at MTU - we offer you power now with an eye to the future. ^ * ■ ■. . 1 

WRITE OR CALL TODAY FOR OUR 48 PAGE FALL 1 980 6502 CATALOG ^ 

^^ ^^ International requests include $1 .00 T 

VISA and MASTERCARD accepted i 





Photo credit: 
SUPERNOVA CRAB NEBULA: 

Palomar Observatory, 
California Institute of Technology 



Micro Technology Unlimited 

' Z8Q6 Hillsborough Street 
P.O. Box 12106 
Raleigh. NC 27605. U,S.A. 
(91 9) 833-1458 



MO 



COMPUTE! 



March, 19S1. Issue lO. 



4. Receiver acknowledges receipt of data by raising 
its BUSY flag. 

5. Sender removes (raises) DATA READY. 

6. Receiver lowers BUSY when ready for new data. 

This sequence can be seen to be equivalent to that 
suggested by Eric, except that his DATA READY is 

a high-true signal. The choice of signal polarity given 
here is consistent with the operation of program- 
mable port chips. I/O pins on such chips come up 
from reset as inputs and are high. Thus the DATA 
READY naturally comes up in the false state. For 
the receiver, the BUSY comes up naturally high, so 
that no sequence can be started until the receiver 
program is started and its BUSY line is cleared. It 
will not matter, therefore, whether the receive pro- 
gram or the send program is started first. 

Just as the data direction registers come up 
zeroes from reset defining inputs, the data registers 
come up zeroes as well. Therefore, it is a good idea 
to write output data to port bits BEFORE configuring 
the bits as outputs. If the port bits are made outputs 
first, they will immediately fall to zero, since the 
reset line zeroes the data register. Even if the pro- 
gram immediately writes ones to the outputs, all out- 
put lines will experience a momentary glitch to 
ground (for the duration of an instruction) until the 
new data is written. It is important to understand 
that data can always be written to ports as outputs, 
even if they are programmed as inputs. Making a bit 
an input bit merely disconnects the flip-flop from the 
I/O pin. Even though you will not be able to read 
the data that you have written to an output bit, it is 
still in the flip-flop. A representation of a program- 
mable port I/O bit (PAO) and the corresponding 
data direction register bit is shown in Figure 3, and 
is worth discussing. 



4j- 



D 
>T 



>T 



T^. 



# 






Figure 3. Programmable Port Structure 

The flip-flop (item 3) has its "D" input con- 
nected to the data bus bit DBO. It can serve as an 
output bit if and only if it is connected to the port 
pin PAO via the three-state gate (item 1). With this 
gate enabled, anything written to the zero bit of a 



port A will appear on the I/O pin. If the gate is 
disabled, however, we are now free to use the I/O 
pin as an input. Note, however, that programming 
the bit as an input DOES NOT PREVENT US 
FROM WRITING TO THE DATA flip-flop. While 
we will not be able to read the data back, the data is 
still in the flip-flop, and it will appear on the I/O pin 
if this bit is subsequently made an output. When the 
port is read it is the condition of the I/O pin that is 
being read, regardless of whether the bit is program- 
med as an input or output. (This is not true of B 
ports, where the data read back when programmed is 
the latched data. That is, a bit can be programmed 
as an output and a one and the I/O pin shorted to 
ground and have it read back as a one). The three- 
state gate (item 1) is controlled by a second flip-flop 
(item 4) called a data direction flip-flop. This condi- 
tion of this flip-flop may be read via its three-state 
gate (item 5). (Note that what we have called a 
three-state gate is in actuality implemented with 
MOS open-drain technology). 

The purpose of this discussion was to convince 
the reader, that it is possible to successfully write 
output data to a port while it is still programmed as 
input. Not only is it possible, but it is recommended 
as good port software technique, to avoid un- 
necessary output "glitches". 

Getting back to handshaking, it is now necessary 
to look at handshaking software. We would like to 
consider both the transmit and receive programs. 
Figure 4 shows a flowchart for a transmit program. 
First the ports must be set up. Then before transmit- 
ting, we must be certain that the receiver is not 
BUSY, and wait until BUSY is false. Then data is 
loaded and sent to the port. Next the DATA 
READY flag is lowered. The program now waits for 
the handshake response from the receiver, that is, for 
BUSY to become true. As soon as that has been 
verified, the DATA READY flag is cleared and the 
memory pointer is incremented and compared with 
the end pointer. If the end has not been reached, the 
process is repeated for another byte. Otherwise the 
program returns to the monitor. 

A flowchart for a receive program is shown in 
Figure 5. After initialization, a wait is made for a 
DATA READY indication, then the data is tucked 
away, the BUSY flag raised, and the pointer in- 
cremented. At this point, the pointer may be com- 
pared with an endpoint for a completion test. If 
done, the BUSY flag is lowered and a return made 
to the monitor. If not, the BUSY flag is lowered and 
another data byte is fetched. 

Both transmit and receive programs can vary, 
depending upon whether speed or code conciseness is 
the most desirable feature. This discussion will be 
continued in the next column with an analysis of 
typical transmit and receive programs. . 



March, 1981 Issue lO. 



COMPUTE! 



1-31 



( TRANSMIT ) 



f RECEIVE ) 



***•*•*#*•••******•****•■********. 



SET VV PORTS 



SET LP PORTS 




LOAU DATA KROM 

MEMORY AM) SEND 

TO PORT 



SEND 
DATA RKAUY 




CLEAR UATA REA[)Y 



[SCBEMEST 
PQISTER 




(RETURN ^N 
TO MONITOR J 




* 



K 



M 



M 



M 



M 



LOAD DATA FROM 

PORT AND STORE 

IN MEMORY 



.SEND BL'SY 



INCREMENT 
POINTER 



< DONE,' > 

N 










CLEAR BUSY 


CLEAR BUSY 


















( 


^ KKILHN 1 








y 



Figure 4. Transmit Figure 5. Receive 
Handshake Flowchart Handshake Flowchart 



* 

* 
* 

* 
* 

* 

* 

* 
* 

* 

t 

* 

* 



END FRUSTRATION!! 



FROM CASSETTE FAILURES 

PERRY PERIPHERALS HAS 

THE HDE SOLUTION 

* OMMDISK SYSTEMS (5" and 8"} 

* ACCLAIMED HDE SOFTWARE 
« • Assembler, Dynamic Debugging Tool, 

* Text Output Processor, Comprehensive 
■► Memory Test 

* • Coming Soon— HDE BASIC 

* PERRY PERIPHERALS S-100 PACKAGE 

* Adds Omnidisk (5") to 

* Your KIM/S-100 System 
J* Construction Manual— No Parts 
*• FODS & TED Diskette 
«• $20. +$2. postage & handling. (NY residents 



* 

* 
* 

* 
* 
« 



add 7% tax) (specify for 1 or 2 drive system) 

Place your order with: 
PERRY PERIPHERALS 

P.O. Box 924 
Miller Place, N.Y. 11764 
(516) 744-6462 

Your Full-Line HDE Distributor/Exporter 



r 



The Seawell little buffered mother 



The LITTLE BUFFERED MOTHER 
provides the most general possible 
expansion: filling in the first 6K of 
the memory map with RAM and 
buffering all of the E-connector lines 
allows straightforward expansion in 
8K bloct<s up to 65K, The provision 
for a bank select line allows for ex- 
pansion beyond 65K and/or the ability 
to switch devices in and out of the 
memory map. The four board slots 
on the LITTLE BUFFERED MOTHER 
are sufficient to expand with 1 6K RAM 
boards (SEA-16 or equivalent) or 
EPROM (SEA-PROMMER II) to 65K, 
The connector on the back of the 
LITTLE BUFFERED MOTHER allows 
lurther e>;pansion of the mothertjoard 
(SEA-MAXI-MOTHER). The back con- 
nector can also be used as a board 



SEA-l , SINGLE BOARD DEVELOPMENT SYSTEM $595 

SEA-16 , . . 16K RAM BOARD $280 

SEACMOS DAYfDATE CLOCK. 8 2K EPROM SOCKETS & 8K CMOS RAM $595 

, . 7K NMOS RAM. IK CMOS RAM $395 

WITHOUT RAM $289 

SEACVT cVf POWER SUPPLY KIT , $1'D 

TRANSFORMER ONLY $ 56 

SEA-DEBUG HARDWARE BREAKPOINTS AND TRIGGERS 1310 

SEA-FDCm . - DOUBLE DEr^SITY, DOUBLE SIDED DISK CONTROLLER 

(w( DOS Tor SEA- 1) S425 

SEA-ISDC 8 SERIAL PORTS WITH LOCAL PROCESSOR a. DUAL PORT BAM $595 

SEA-LBM LIHLE BUFFERED MOTHER FOR KIM. SYM. AIM W4K RAM S199 

WITHOUT RAM S159 

RAM KIT ADDITIONAL 4K ol RAM & BUFFER FOB LBWJB $ 50 
SEA-MAXI MOTHER , 10-SLOT MOTHERBOARD $135 

$260 
S299 
$ 99 
S 49 




.k.tliU , — llilli— _. iiUJ 



slot. The whole system can be run 
from a regulated supply by shorting 
out the onboard regulators. The 
LITTLE BUFFERED MOTHER also 
has three LEDs indicating power. IRQ. 
and NMI. A KIM keyboard/TTY switch 
is also provided. 

Little Buffered Molfier 

W/4K RAM $199 

W/o RAM $159 

RAM Kit $ SO 

■ Connects direoily lo ifie KIM. SYM Of AIM 

• ^ expansion slots 

' Bulters for all signals 

• 4K RAM on board 

• Application ard expansion connectors available 

• -v 5V. -I- 12V, and - 12V regulatOTS 

• Bank Select signal 

• Full decoding tor Itie KIM-i 

• Power. NMI and IRQ status LEDs 

• Provision lor addilional motherboards 



Seawell products are also available from 
Excerl Incorporated and 
AB Computers. 



c 



SEA-MICRO MOTHER 4SL0T MOTHERBOARD 

SEA-PIOB 4 FULLY-BUFFERED 6522s 

SEA-PROMMER II EPROM PROGRAMMER 

SEA PROTO COMPLETELY DECODED PHOTOTYPIt^G BOARD 



POPULATED 
, , BLANK 

WE PAY UPS GROUND FREIGHT ON ALL PREPAID ORDERS. PRfCES AND SPECIFICATIONS 
ARE SUBJECT TO CHANGE WITHOUT NOTICE WASHirJGTON RESIDENTS ADD 53% 
SALES TAX MASTERCHARGEmiSA ACCEPTED 



SEAWELL: 

BOX 30505, 
SEATTLE. WA 98103 

206/782-9480 




142 



COMPUTE) 



March. 1981 Issue 10. 



Experimenting 

With 

The 6551 ACIA 



Marvin L. De Jong 

Department of N/fathematics-Physics 

The Sohool of the Ozorks 

Pt. Lookout, MO 

There is a growing interest in data communications, 
computer networks, time-sliaring services and other 
forms of intercomputer communications. An impor- 
tant element in many data communications systems 
is an Asynchronous Communications Interface 
Adapter (ACIA). Both Rockwell International and 
Synertek manufacture a 6502 family device known as 
the 6551 ACIA. The purpose of this article is to pro- 
vide information about interfacing this device to 
6502-based microcomputers and to provide informa- 
tion about operating and controlling the 6551 with 
software. 

Since I was not lamiliar with this chip, I decided 
to do some simple experiments with it to supplement 
the meager (in my opinion) information supplied by 
the specification sheets from Rockwell and Synertek. 
In particular, I decided to use my AIM 65 
microcomputer as a smart terminal for a KIM-1, 
operating the latter in its "teletypewriter" mode. 
Although this may seem ridiculous, the idea might be 
useful in a laboratory where various student stations 
have a KIM-1 that is used for experiment control or 
data acquisition. If all the KIM-ls were connected to 
a central terminal, one could load a program into all 
of them simultaneously or, with the appropriate 
switching circuitry, one could collect and process 
data from each of them. In any case, the experiment 
taught me what a KIM-1 is like when operated in its 
TTY mode rather than from its keypad, and more 
importantly, I learned some things about the 6551 
ACIA. 

A circuit that can be used to interface the 6551 
to a 6502-based microcomputer is shown in Figure 1 . 
The connections to the microcomputer are on the 
left-hand side of the figure. The advantage of using a 
family-type chip is the ease with which the device 
may be interfaced to the microcomputer. Thus, the 
connections IRQ, RES, 02, R/W, and the data bus 
connections are all straightforward. If the lines bet- 
ween the microcomputer and the 6551 are kept short, 
a few inches or so, no buffering is required. This cir- 
cuit was built on a protoboard attached to the expan- 
sion connector of an AIM 65. The four registers on 
the 6551 are selected with address lines A0 and Al 



connected to the register select pins RS0 and RSl, 
respectively. 

The chip select (or device select) signals, CS0 
and CSl, can be obtained in several ways depending 
on you r mic rocomputer system. The AIM 65 pro- 
vides a DS9 device select pulse that is active at logic 
zero for all addresses $9000 through $9FFF. This 
signal is available at the expansion connector, and it 
was used in this circuit. The CS0 pin could have 
been connected to -t- 5V, but we chose to connect it 
to address line AI0 to save half of the address space 
between $9000 and $9FFF for other possible I/O 
functions. 

If you have a SYM-1 you can use device select 

18, whic h is available on the expansion connector, 
for CSl. Pin CS0 can either be tied to logic one 
( +5V) or connected to an address line to divide the 
device select 18 address space in half. 

If you have a KIM-1 you can use one of the 
device selects Kl to K4 with suitable pull-up 
resistors, say 1000 ohms. Tie CS0 to +5V. 

If you have an APPLE II you can build the in- 
terface shown in Figure 1 on a peripheral card and 
plug it into one of the eight card slots. However, you 




.MIH MM .W>.^1 1 



Figure 1. The circuit to interface the 6551 ACIA to a 
6502-based microcomputer to control a KIM-1. 

must build your own decoding circuit because you 
cannot use either the device select (DS) or the I/O 
select signals. 6502 family chips such as the 6522 and 
the 6551 generally require that the address lines and 
the chip selects are stable some time (approximately 
200 nanoseconds) before the rising edge of the 02 
clock signal. The device select signals generated by 
the APPLE 11 address decoding circuitry have been 
ANDED with 2 (actually 00), and consequently they 
cannot be used. This is really unfortunate since it 
would be very easy to interface 6502 family chips to 
the apple's peripheral bus if it were not for this 
fact. One could use a 74LS04 inverter and a 74LS30 
eight input NAND gate to generate a device select 
for some page of memory not used by the APPLE II, 
if you want to interface a 6551 to your APPLE II. 



March, 1961- issue 10- 



cofwure 



143 



EXCERT, INCORPORATED 

AIM-65 



« * % 



T* T* ^P 



P/N 

A65.1 

A65-4 

A65-A 

A65-B 

A65-PL 



QTY 1-9 

AIM-65 w/lK RAM $375 

AIM-65 w/4K RAM $420 

Assembler ROM $85 

Basic ROMS $100 

PL/65 ROMS $125 



P/N 
A65-4AB 


SPECIAL 

AIM-65 w/4K RAM 


QTY 1-9 
$595 


A65-4B 
A65-F 


Assembler and BASIC 

AIM-65 w/4K RAM, BASIC 

Forth ROMS 


$510 
$150 



ACCESSORIES 

P/N QTY 1-9 

Power Supplies (Fully AIM-65 Compatible, In- 
dustrial Quality Open Frame) 

PRS3 + 5V at 3A, + 24V at lAw/mtg hardware, cord, etc. ...$65 

PRS4 + 5V at 2A, + 24V al .5A w/mtg hardware, cord, etc. ... $50 

PRS5 +5V at 2A, +24V ±15% at 5A±12V to ±15V at 

.4A $75 

From The Enclosure Group 

ENC 1 AIM-65 case $45 

ENCIA AlM-55 case w/space for one expansion board $49 

Cases With Power Supplies 

ENC3 ENClw/PRS3 mounted inside $115 

ENC3A ENCIA w/PRS3 mounted inside $119 

ENC4 ENCl W/PRS4 mounted inside $100 

ENC4A ENCIA w/PRS4 mounted inside $104 

ENC5 ENCl w/PRSS mounted inside $125 

ENC5A ENCIA w/PRSS mounted inside $129 

From The Computerist, Inc. 

MCPI-2 Mother Plus ll^M Dual 44 pin mother card takes MEBl-2, 
VIBl, PTCl. fuiiy buffered, S expansion slots underneath the 
AIM $100 

MEBl-2 DRAM PlusTM 32K RAM, 16K Prom socl<ets, 2-65221/0 chip 

and prograinmer for 5V EPROMS $ 16K RAM $295 

$32K HAM $395 

PTCl -2 Pronto Plus^"' Prototype card same size as KlM-1, MEBl-2, 
VIBl $60 

VIBl-2 Video Plus II^M board with 128 char, 128 user char, up to 4K 
display RAM, light pen and ASCII keyboard interface . . $295 

CABLE ForMEBl-2.Vlbl-2, PTCl-2 $15 

From Optimal Technology 

ADCl A/D eight channels, D/A 2 channels. Requires ±12V to 

± 15V at lOOMA & 2-1/0 Ports from AlM-6522 $12t 

$25 



PIN QTYl-9 

From Seawell Marketing, Inc. 

MCP2 Little Buffered Mother'™ Single 44 pin {KlM-4 style) mother 

card takes MEB2, PGR2. PTC2 and PI02. Has on 5V 
regulator for AIM-65, 4 expansion slots. Routes A&E signals 

to duplicates on sides with 4K RAM $ 199 

MEB2 SEA 16T" static RAH board takes 21 14L with regulators and 

address switches $280 

PGR2 Programkmer lor 5V EPROMS with ROM firmwave, 
regulators, low force sockets, up to 8 EPROMS simul- 
taneously, can execute after programming $299 

PI02 Parallel I/O board with 4-6522-s $260 

PTC2 Proto/Blankf" Prototype card that fits MCP2 $49 

PTC2A Proto/Pop'''" with regulator, decoders, switches $99 

From MTU 

DAC3 8 bit DAC Board $49 

FDC3 Floppy disk controller bd. & DOS, up to lour 5Vi" or 8" driws, 

double-sided, double density $595 

MCP3 Card file w/4 slot expansion mother bd. w/keybd. 

brackets $85 

MEB3-2B Banker board, 32K RAM. low power. 16K PROM sockets 

26522 I/O chips & programmer for 5V EPROMS $450 

PI03 24K PROM. 4-8 bit I/O ports w/RS-232 port to 4800 BPS. 

PROM Programmer $295 

VIB3 8K DRAM Bd. low power w/ composite video out In 200 lines 

320 dot/line format $240 

All MTU Software Available For These Products. 



Miscellaneous 

TPT2 Approved Thermal Paper Tape 

5/ 165' rolls $10 

MEM6 6/ZI 14 RAM Chips $45 

CASl Available Audio Cassette Recorder $40 

2716 16K5V EPROM Call for latest prices 

2532 32K5V EPROM Call for latest prices 

A65-P Printer $75 

A65-DM Display Module $30 



All AIM-65 Spare Parts Are Available 

ASSEMBLED & TESTED 
SYSTEMS 

We specialize in assembled and tested systems made from the above items. Normally, the price 
will be the total of the items, plus $5 for handling, shipping is extra on all C.O.D.'s or invoiced 
orders. Six Month Warranty on all systems. 



Higher quantities quoted upon request. 
C.O.D.'s accepted, shipping will be added. 
Add $5.00 for shipping, insurance and 
handling on prepaid orders. 
Minnesota residents add 4% sales tax. 
Prices subject to change without notice. 



Please call or write for exact 

prices or if questions arise. 

Mail check or Money Order To: 

EXCERT, INC. 

Educational Computer Division 

P.O. Box 8600 

WHITE BEAR LAKE, MN. 55110 

621-426-4114 



T44 



COMPUTE! 



March. 1981, Issue lO. 



Proceeding to the circuitry on the right-hand side of 
Figure 1 , you will note that you need a crystal whose 
frequency is 1.8432 MHz. The remaining connec- 
tions are either input or output pins that connect the 
6551 to devices outside of the microcomputer system, 
such as a modem or, in the experiment described 
here, another microcomputer. In this application 
only the data output (TxD) and data input (RxD) 
pins were used. A 74LS04 was used to provide 
suitable buffering between the 6551 and the KIM-1 
printer and keyb oard pins for the teletypewriter. The 
input pins CTS, DCD, an d DS R ar e tied to logic 
zero while the output pins RTS and DTR are left 
floating in this application. If the 6551 were con- 
nected to a modem, printer, or another terminal, 
then these pins would be used. The similarity bet- 
ween the names of these pins and RS-232C pin func- 
tions is not a coincidence. My modem requires the 
CTS, DHR, and DCD connections. A 1488 RS-232C 
line driver and a 1489 RS-232C line receiver could 
be used to change the voltages to the appropriate 
levels for a standard RS-232C interface, but we 
chose to experiment %vith a KIM-1, and did not need 
RS-232C signals. 

If A0 and Al are used as register select signals, 
as indicated in Figure 1, then the low-order nibble of 
the address that accesses the 6551 will be $0, $1, $2, 
and $3 for the data registers, status register, com- 
mand register, and control register, respectively. For 
example, if the address decoding scheme shown in 
Figure 1 is used, the transmitter data register is ac- 
cessed by WRITING to $9400 and the receiver data 
register is accessed by READING location $9400. 
Writing to the status register at $9401 causes a pro- 
grammed RESET, and the status register is read at 
$9401. Refer to Figure 2 to identify the meaning of 
the bits in the status register. 



sr^U-'. fttr.fM I kit^naii 



tyTERRl'PT FLAG — 

- NO interhl'pt 

1 - ISTtliftUPT 



DATA SET HEADY fLAC 

D ' D5RLUW|REAt>V» 

1 ^ DSH HIGH (NOT HEAUV) 



DATA CARBIEH DETECT FLAH 

D ■ DCD1-0W4T:ARR[ER irETFAITTDl 
i - DCD IHGIt I NO CARRIER) 



= alCISTKH EMI'lAilRyOl'IIONi 



- FARITV FKHOR FI.AU 

l> - ^<^ PARTI Y ERHIIR 
I ■ PAHITV FHROH 

-FJt4\liNC tRROR M AC 
iJ - NO fRAMINCi ERROR 
I ^ FRAMING ERROR 

- OVERRUN TLAC 

a - NO OVEHRCS 
1 * OVIJIIVN' 

- )lt^£J^'ER HATA REf.tsTEIt FIAO 

- NOT FIT.I. 

1 ' FtT.l..lHtiOFTIONt 



Figure 2. Schematic diagram of the status register of the 
6551. 

For the simple experiments described here the 
status register bits of most interest are the transmit- 
ter register flag and the receiver register flag. 
Writing to the transmitter register clears the register 
flag, and one should not write data to this register 
again until the data in the transmitter register has 
been transformed into a serial bit stream and has 
been transmitted by way of the TxD pin. When the 
word has been transmitted, bit four goes to logic one, 
and the transmitter data register is ready to accept 



another word. Likewise, when a complete word has 
been received by way of the RxD pin and the word 
is in the receiver data register, then bit three of the 
status register goes to logic one, and the word is 
ready to be read from the 6551. Both of the events 
just des cribed may be used to produce interrupt re- 
quests (IRQ pin goes to logic zero). That is, by pro- 
gramming the command register, one can produce 
an interrupt request either when the transmitter 
register is empty or when the receiver register is full. 



<OMM^Nil Rr.UiVIERil-FI 



PARITY CONTROT ' 

i O OIFU fARlt V 1 r. k 
H I EVEN PARI1 Y r & R 
1 U MARK 0\ F^h! lY RI1 

>;i» FAHIIl r iiir K 

r I VFAI I lis I'SHIIY ilCI 

VtM'AHin I nil K 



IMRITY COM HOI. ENAHI F 

it ^ NO FAHITV HIT ON T. 

NO FYRITV CHECK O.N H 
I - PARITY CONTROL FN ARI.EO 



KFCFIVFR ECHO (CIM HOI . 

. NO ECHO 

1 - Rtt-Eivth tiiHCi 



. INIERRTPl RFiiY'F.STroNTROI. 
I^IJ ENABLED 
IRQ IIISAHLEO 



TRANVMI I IT» INTFRRIIPI (ON | HOI. 



■I 3 

D D Wl HIGH. NO INlrRnUrT 

I ITS LOU. INTFRHCPT 

1 (t KK LOY*. NO INTERRUPT 

I I ]fn LOYV. NOiNTERRi:Pr. 
rjlAN5.MIT BREAK 



Figure 3. Schematic diagram of the 
command register of the 6551. 



Refer to Figure 3 to identify the meaning of the 
various bits in the command register, and refer to 
Figure 4 to identify the meaning of the bits in the 
control register. The function of these registers will 
become apparent when we describe the program to 
use the AIM 65 as a terminal to control the KIM-1. 
In short, they allow the user to program the 6551 to 
operate under a large variety of conditions. 

The program to test the 6551 with the AIM 65 
and KIM-1 is given in Listing 1, The main program 
reads the keyboard and outputs this character to the 
6551 transmit data register. The interrupt routine 
(remember to load the interrupt vectors if you use 
this program) reads the 6551 receive data register 
when the KIM-1 returns information to the AIM 65. 
In short, the entire program makes the AIM 65 
behave exactly like a teletypewriter terminal as far as 
the KIM-1 is concerned. Since the 6551 is being 
operated in the interrupt mode, the first instruction 
in Listing 1 clears the 6502 interrupt flag to allow the 
6551 to interrupt it. The next two instructions in the 
program load the command register. Refer to Figure 
3 to see what bits were set or cleared. Since the 
KIM-1 software in the monitor simply strips the 
parity bit from any received word, the command re- 
gister was initialized to disable and disregard any 
parity bits. Since the 6551 is being operated in an in- 
terrupt mode, bit one of the command register is 
cleared. However, it is the receiver portion of the 
6551 that is being allowed to cause an interrupt, thus 
bit three of the command register is kept at logic one 
to prevent interrupts from the transmitter. The other 
bits of the command register control the handshaking 
signal pins of the 6551, and therefore they were not 
of any concern in this application. 

The fourth and fifth instructions in Listing 1 



March, 1981. Issue lO. 



COMFUTE! 



145 



load the control register. Refer to Figure 4. A 
"three" in the low-order nibble of the control 



(UN [ROI. HKCISTER ll'MDlj 



STOP mr MMhkH- 

II - I -'.roPHli 

I - 'i STOP iMls 



WDITIJ LRNCTTl- 

a BITS 

I 7 BITS 

1 Q f, BITS 
I T 1 BITS 



KT-CT-IVER CI.IJCK SOVK^K" 



I UO I 



lauo 

ISOO 

3400 

4KW 
7HM> 
»M>0 



Figure 4, Schematic diagram of the control register 
of the 6551. 

register sets the Baud rate at 110. Higher Baud rates 
are possible, depending in part on whether the ther- 
mal printer on the AIM 65 is used. Without the 
printer operating, rates as high as 2400 Baud are 
possible. The usual teletypewriter data format is one 
start bit, seven data bits, one parity bit, and two stop 
bits. However, a number of formats will work, and 
we chose an eight bit word with one stop bit. Note 
however that the command register was set up for no 
parity bit, thus our word looks just like a word in the 
teletypewriter format. If we would have loaded the 
control register with SBA sending seven bits of word 
and two stop bits at 2400 Baud, the program would 
still work. In order to interface the 6551 to any 



device you must program the command and control 
registers to match the protocol of the devices that are 
communicating. 

Still keeping an eye on Listing 1, note that the 
next instruction is a subroutine jump to an AIM 65 
subroutine that reads the keyboard and returns the 
ASCII code for the key depressed in the 6502 ac- 
cumulator. This character is loaded into the 6551 
transmit data register, and is promptly sent out on 
the TxD pin in serial form. Before getting another 
character, the program waits in a loop until the word 
is sent. It does this by examining bit four in the 
status register (refer to Figure 2). When the character 
has been sent and the transmit data register is 
empty, then the program loops back to get another 
character when the keyboard is scanned. 

Refer next to the interrupt routine. A PHA in- 
struction saves the accumulator. Next, the receive 
data register is read. The only time an interrupt 
occurs is when a new word is received from the 
KIM-1, and the second instruction of the interrupt 
routine gets the character in the accumulator of the 
AIM 65's 6502. Next, it outputs the character to the 
AIM 65 display. The fourth instruction clears the in- 
terrupt signal from the 6551. The accumulator is 
recalled, and the interrupt routine is concluded. 

A future project includes interfacing the 6551 to 
a Novation Cat modem and trying to send informa- 
tion over telephone lines. Anyone out there care to 
join this experiment? 



Listing 1. Routines to Control the KIM-1 with an AIM 65. 



CTRLRG = $9403; Conlrol register of the 6551. 

CMNDRG = $9402; Command register of the 6551. 

STATUS = $9401; Status register of the 6551. 

RDWR = $9400; Read/Write Data register of the 6551. 

SOFOO 58 START CLI 

OFOl A9 09 LDA #$09 

0F03 8D 02 94 STA CMNDRG 



0F06 A9 13 

0F08 8D 03 94 

OFOB 20 3C E9 REPEAT 

OFOE 8 D 00 94 

OFU AD 01 94 CHECK 
0F14 29 10 
0F16 FO F9 
0F18 DO Fl 

Interrupt Routine 
JOEOO 48 IRQ 

OEOl AD 00 94 

0E04 20 7A E9 

0EO7 AD 01 94 

OEGA 68 

OEOB 40 
INTERRUPT VECTORS: [$A404] = $00; [$A405] = 



LDA #$13 
STA CTRLRG 
JSR GETKEY 
STA RDWR 

LDA STATUS 
AND #$10 
BEQ CHECK 
BNE REPEAT 



PHA 

LDA RDWR 

JSR OUTCHAR 

LDA STATUS 

PLA 

RTI 



Clear interrupt flag. 
Set up command register- 
Set up control register. 
Baud rate is 110, 
Get input character from the 
AIM 65 keyboard, output it to 
6551. 
Is transmit register empty? 

No. Then wait here. 

Yes. Then get another character. 

Save accumulator. 
Read the receive register and 
output the result. 
Read the status register to clear 
the interrupt flag. 
Return to the main program. 
JOE 



146 



COMPUTE! 



March, 1981 Issue lO. 



A Vocal Hex 
Dump For The 
KIM-1 



iam C Clements, Jr. 
Dept. Of Chemical And 
Metallurgical hngineering 
Tine University Of Alabama 

This article describes a program for the KIM-1 that 
begins at a given RAM address and pronounces the 
contents of successive locations, with appropriate 
pauses inserted for naturalness, just as a person 
would read off a list of hex words. It uses what is 
almost certainly the least expensive speech synthesis 
equipment and software now on the market; for 
about $100, the single-board computer owner can ex- 
periment with computer-generated speech. The pro- 
gram given here is concerned with removing a little 
of the drudgery from proofreading programs in 
RAM. The program runs on a KIM-1 to which has 
been added a 6522 VIA and at least IK of expansion 
RAM. 

Personal computers surely are the ultimate in 
modern versatility, making everything from 
dungeons-and-dragons to home automation to self- 
instruction in computer science available to nearly 
everyone. But no matter how much fun it is to use 
the polished end result of one's programming, the 
checking of machine code to see if it was entered cor- 
rectly remains pure drudgery, and the cleverest 
technology isn't likely to ever place it on a level with 
playing a rousing game of motorcycle racing with the 
computer. For those of us with video terminals but 
no printer, it can be especially irritating; one's eyes 
move up to the screen dump, down to the written 
program, up and down, kind of like watching a ver- 
tical tennis game, until the eyes have had it. 

It would help to have someone read off the code 
from the screen so the programmer can keep his eyes 
on the paper. But another person isn't always 
available, and anyhow this is just the kind of work 
that computers were invented to handle, right? The 
only trouble is, most speech synthesizers are expen- 
sive, and arc usually for the S-100 bus, not directly 
usable with the KIM or similar single-board 
machine. Now, thanks to Texas Instruments, Inc. 
and Dave Kemp of East Coast Micro Products, these 
objections have been neatly removed. The T-I Speak 
and Spell'", an inexpensive ($50 range) pre- 
programmed speech synthesizer computer was 
developed to teach kids to spell.' Its internal ROMs 
contain the coding to vocalize hundreds of words plus 



several phrases, the letters of the alphabet, and the 
numerals. But it's more than a toy. The device has 
an internal edge connector intended for plugging in 
additional vocabulary ROMs, and the various con- 
trol lines that operate the speech synthesizer arc 
available there. East Coast Micro Products market a 
small interface kit, model SP-1', that plugs onto the 
edge connector, and performs the level shifting and 
parallel-to-serial conversion needed for interfacing the 
synthesizer to a computer. The whole thing fits into 
the battery compartment of the Speak and Spell'^', 
making a very neat package. Along with the interface 
board, you get extensive support software, a detailed 
explanation of how the synthesizer works, and five 
demo programs written for the SYM computer. The 
software includes a program for pronouncing in- 
dividual hex characters whose ASCII representation 
has been placed in the accumulator, and uses the 
6522 VIA that the SYM uses for I/O. 

As mentioned at the start of this article, my im- 
mediate goal in purchasing the SP-1 was to use it 
with a KIM to read out memory words. The listing 
gives the resulting program. The user begins execu- 
tion at BEGIN, types the first RAM address on the 
TTY, and the program reads 256 locations out on 
the Speak and Spell™. If you're checking fewer loca- 
tions, just hit the reset key when you're through. If 
your program is longer, type in the next location and 
it will read you 256 more. 

The comments in the listing should be self ex- 
planatory for the most part. Label references not 
defined in the listing (such as FPNT, OUTSPE, etc.) 
are mostly labels in the SP-1 software. GETBYT is a 
routine in the KIM monitor. 

The SP-1 software is set up to use the 6522 Ver- 
satile Interface Adaptor on the SYM board, .so unless 
you want to re-program extensively, your best bet is 
to add a 6522 to your KIM; you ought to have one 
anyhow if you're a serious KIMmer. Mine was 
already present on a VIDEO PLUS'''' board that I 
use with my system'. If you don't have a VIA in 
your system, I suggest you refer to the articles listed 
in the footnotes'*. It should not be hard to provide 
one. The SP-1 software resides entirely in the KIM 
on-board memory with one exception: the speech 
data dictionary provided with the software requires 
770 bytes of continuous memory in addition to the 
478 bytes required by the SP-1 support software and 
by the vocal dump routine. None of the code is self- 
modifying, so you can relocate it at will, even into 
EPROM where it will become a valuable utility. The 
only memory that has to be RAM is the twelve-byte 
frame buffer which I located between $17A0 and 
$17AB. If you do relocate, take care to adjust the en- 
tries in TABLE. These are address pointers to entries 
in the speech dictionary supplied with the SP-l. The 
accompanying program listing assumes that the dic- 
tionary resides between $2000 and $2302 in expan- 
sion memory. 



VAK-1 MOTHERBOARID 




We also carry: 

SYM-1 $229°° 

AIM-65W/1K 389°° 
AIM-65W/4K 439°° 

We also do custom 
hardware and soft- 
ware for the 6502 
microprocessor 



PRICE: $139°° 

Call or write for 
shipping charges 
and our complete 
catalog. 



The VAK-1 was specificaliy designed for use with the KIM-1, SYM-1 and the AIM 65 Microcomputer Systems. 
The VAK-I uses the KtM-4* Bus Structure, because it is the only popular Multl-Sourced bus whose expansion 
boards were designed specifically for the 6502 Microprocessor. 

SPECIFICATIONS: 

• Complete with rigid CARD-CAGE 

• Assembled (except for card-cage). Burned in and tested. 

• All IC's are in socl<ets 

• Fully buffered address and data bus 

• Uses the KIM-4* Bus (both electrical Pin-out and card size) for expansion board slots 

• Provides 8 slots for expansion boards on 1" centers to allow for wire-wrap boards 

• Designed for use with a Regulated Power Supply (such as our VAK-EPS) but has provisions for adding 

regulators for use with an unregulated power supply. 

• Provides separate jacks for one audio-cassette, TTY and Power Supply. 

• Board size: 14,5 in. Long x 11.5 in. Wide x 8 in. High 

• Power requirements; 5V,DG @ 0.2 Amps. 

'■KIM-4 is a product of MOS Technology/C.B.M. 




ENTERPRISES 

INCORPORATED 



2951 W. Fairmount Avenue 
Phoenix, AZ 85017 
{602) 265-7564 



146 



COMPUTE! 



t*irch. 19B1. Issue lO 



0100- 

0103- 

0105- 

0108- 

OlOA- 

OlOC- 

OlOE- 

0110- 

0112- 

0115- 

0118- 

OllA- 

OllB- 

OllC- 

OllD- 

OllF- 

0122- 

0125- 

0126- 

0127- 

0129- 

012B- 

012D- 

012F- 

0131- 

0132- 

0134- 

0135- 

0136- 

0137- 

013A- 

013B- 

013D- 

013E- 

013F- 

0142- 

0144- 

0147- 

0149- 

014C- 



20 

85 

20 

85 

A9 

85 

A9 

85 

20 

20 

AO 

C8 

98 

48 

Bl 

20 

20 

68 

A8 

C9 

DO 

FO 

A2 

DO 

48 

29 

4A 

4A 

4A 

20 

68 

29 

OA 

AA 

BD 

85 

BD 

85 

4C 

00 



014F- 20 
0152- 9F 
0154- DB 



9D 
OB 
9D 
OA 
AO 
04 
17 
05 
00 
2D 
FF 



OA 
31 
2D 



FF 
EF 
D3 
20 

OE 

F 



4C 
02 
40 
03 
DO 
20 

76 
2 
20 



IF 



IF 



02 

01 



01 
01 



3E 01 



OF 



01 

01 

02 
49 

20 



0010 
0020 

0030 

0035 

0040 

0050 

0060 

0070 

0080 

090 

0100 

0110 

0120 

0130 

0140 

015 

0160 

0170 

0180 

0190 

0200 

0210 

0220 

0230 

0240 

0250 

02 6 

0270 

0280 

0290 

0300 

0310 

0320 

0330 

0340 

0350 

0360 

0370 

0380 

0390 

0400 

0410 

0420 

0430 

0440 

0450 

0^60 

04 7 



11 0480 



0157- 21 52 21 

015A- 86 21 

015C- B7 21 DA 0490 

015F- 21 16 22 

0162- 36 22 

0164- 61 22 8E 0500 

0167- 22 B5 22 



ADLO 
ADHI 
SPNT 
GET BYT 
FPNT 
SPIN IT 
OUTSPE 
BEGIN 



LOOP 



PAUSE 
SAY 



SPEAK 

SPl 



TABLE 



. BA 

. DE 

. DE 

.DE 

.DE 

.DE 

.DE 

.DE 

JSR 

STA 

JSR 

STA 

LDA 

STA 

LDA 

STA 

JSR 

JSR 

LDY 

INY 

TYA 

PHA 

LDA 

JSR 

JSR 

PLA 

TAY 

CMP 

BNE 

BEQ 

LDX 

BNE 

PHA 

AND 

LSR 

LSR 

LSR 

JSR 

PLA 

AND 

ASL 

TAX 

LDA 

STA 

LDA 

STA 

JMP 

.BY 



?100 

$A 

$B 

2 

$1F9D 

4 

$200 

$2dO 

GETBYT 

*ADHI 

GETBYT 

*ADLO 

l$AO 

*FPNT 

#$17 

*FPNT+1 

SPINIT 

PAUSE 

#$FF 



(ADLO) ,Y 
SAY 
PAUSE 



#$FF 

LOOP 

BEGIN 

#$20 

SPl 

#$F0 

A 

A 

A 

SPEAK 



#$F 
A 

TABLE >'X 

*SPNT 

TABLE+1/X 

*SPNT+1 

OUTSPE 

$20 $49 



GET START 

ADDRESS 

FROM 

KEYBOARD 

SET FRAME 

POINTER 

TO 

$17A0 (12 LOGS NEEDED) 

SET UP TIMERS 

PAUSE BEFORE SPEAKING 

USE Y TO COUNT LOGS. 

DUMPED 



;GET CURRENT CONTENTS FOR DUMP 
; PRONOUNCE CONTENTS? 
;THEN PAUSE 



;LOOP 256 TIMES 

;GET NEW START 

;SET POINTER FOR PAUSE 

;BRANCH TO SPEECH PAUSE 

;SAVE CONTENTS 

;GET HIGH-ORDER NYBBLE 

;FORM INDEX 

;INTO ADDRESS TABLE 

;SPEAK FIRST CHARACTER 

;GET LOW-ORDER NYBBLE 
;FORM INDEX 
7AND FALL THROUGH 
;T0 SPEAK IT 



TABLE FOR 



$20 $76 $20 $9f $20 ;ADDRESS 



.BY $DB $20 $11 $21 
SPEECH DICTIONARY 



$52 $21 $86 $21 



BY $B7 $21 $DA $21 $16 $22 $36 $22 



BY $61 $22 $8E $22 $B5 $22 $D $22 $F D $22 



March. 1981 Issue lO. 



COMPUTE! 



149 



The SP-1 utilities can be used for many other 
purposes. A great deal of information and some 
references concerned with speech synthesis using 
Linear Predictive Coding techniques are given in the 
literature supplied with the kit. With this material, 
you can make your KIM as talkative as you wish! 



016A- 
016D- 



DO 
11 



2 2 FD 



0510 



,EN 



LABEL FILE: [ / = EXTERNAL ] 



./ADLO=0 0A 
/GETBYT=1F9D 
/OUTSPE=0 2D0 
PAUSE= 012D 
SPl=013F 



/ADHI=OOOB 
/FPNT=00 04 
BEGIN=010 
SAY=0131 
TABLE=014C 



/SPNT=0002 
/SPINIT=0200 
LOOP=011A 
SPEAK=013E 



/.''0000> 016E>016E 



Footnotes 

1 . Speak and Spell is a trademark of Texas Instrumcncs, Inc. 
VIDEO PLUS is a trademark of The Computerist, Inc. 

2. East Coast Micro Products, 1307 Beltram Ci., Odcnton, 
Md. 21113. 

3. See S502 User Notes, No. 13, p. 16 for information about 
adding a 6522 I/O board. 

4. See MICRO, No. 17, pp. 27-39 for a general description of 
the 6322. 



AIM Hardware — Software 
KIM by 

SYM MicroMate 



• ColorMate 

Add color graphics to your computer 
system. 6847-based design. Prices 
start at $50.00. 

• FirstMate 

Makes prototyping and experimenting 
a snap. Recommended for students 
and pros alike. Assembled and tested 
. . . $87.50 

• ROM Bank SwitchMate (SYM) 

Expand your ROM space. Switcli under 
manual or software control. Assembled 
and tested . . . $45.00 

• PrograMate (SYM) 

Convert your SYM into a PROM pro- 
grammer for Ik (2758), 2k (2716) and 4k 
(2532, Tl pinout) UVPROMs. Hardware 
and software . . . $55.00 



• Write for details to: 
(Mention this ad and 
save 5% on first order.) 



MicroMate 

P.O. Box 50111 
Indianapolis, IN 
46256 



6502 FORTH 

> 6502 FORTH is a complete programming system which 

contains an interpreter/compiler as well as an 

assembler and editor. 
6502 FORTH runs on a KIM-1 with a serial terminal. 

(Terminal should be at least 64 chr. wide) 
All terminal I/O is funnelled through a jump table near 

the beginning of the software and can easily be 

changed to jump to user written I/O drivers. 
6502 FORTH uses cassette for the system mass storage 

device 

> Cassette read/write routines are built in (includes 

Hypertape). 
92 op-words are built into the standard vocabulary. 
Excellent machine language interface. 
6502 FORTH as user extensible. 
» 6502 FORTH is a true implementation of forth according 

to the criteria set down by the forth interest 

group. 

> Specialized vocabularies can be developed for specific 
applications. 

6502 FORTH resides in 8K of RAM starting at $2000 and 
can operate with as little as 4K of additional 
contiguous RAM. 



6502 FORTH PRICE LIST 

KIM CASSETTE, USER MANUAL, AND 
COMPLETE ANNOTATED SOURCE 
LISTING $90.00 

($2000 VERSION) PLUS S&H 4.00 

USER MANUAL (CREDITABLE 
TOWARDS SOFTWARE 
PURCHASE) $15.00 

PLUS S&H 1.50 

SEND A S.A.S.E. FOR A FORTH 
BIBLIOGRAPHY AND A COM- 
PLETE LIST OF 6502 SOFTWARE, 
EPROM FIRMWARE (FOR KIM, 
SUPERKIM, AIM, SYM, and 
APPLE) AND 6502 DESIGN 
CONSULTING SERVICES 
AVAILABLE 

Eric Rehnke 

1067 Jadestone Lane 

Corona, CA 97120 



Now Available For 
KIM, AIM, And SYM 



150 



COMPUTE! 



March, 1981. Issue lO. 



Expanding 
KIM-Style 
6502 Single 

BOOrCl Hal Chamberlif 

Computers 

The iVIodified 
KIIVI Bus 

Part 3 of 3 



This leads us to a definition of the "Unbuffered 
Modified KIM Bus". KIM is part of the name since 
the bus is essentially what a KIM-1 single board 
computer presents on its expansion connector. 
"Modified" is part of the name because not all of 
the 44 signals on the expansion connector are actu- 
ally part of the bus. Those signals that are part of the 
bus are common to the SYM and AIM computers as 
well as the KIM and thus any of these machines may 
be plugged into the bus without modification. 

Figure 6 gives a signal listing for the bus. 
Signals marked with an * do not connect to the pro- 
cessor but do connect to all of the other boards in the 
system. Most of these have different specialized func- 
tions on the different processors anyway and are not 
generally useful in a bus oriented system. Note that 
RDY is one of the signals that is not bussed. All 
modern memories are quite fast enough to operate 
without wait states in 6502 systems and besides, the 
6502 will not wait during write cycles anyway. The 
lines marked (Reserved) are intended for future uses 
such as memory bank switching signals, etc. 

Note that although RAM R/W is listed as a 
signal (should go low during phase 2 of Write 
cycles), it should not be used by a bus interface 
board for general application. The reason is that an 
AIM-65 printed circuit error makes it go low during 
read cycles rather than write cycles like it should. In 
any case, one should be able to design any kind of 
bus interface board using just AO - A15, DO - D7, 
R/W, PHASE 2, interrupt, and power voltages. The 
additional lines are really just convenience signals. 

Two of the signals are important only in KIM 
systems. DECODE ENABLE must go low whenever 
addresses between 0000 and IFFF are on the bus in 
order to activate KIM's on-board memory. VEC- 
TOR FETCH must go low whenever addresses bet- 
ween FFFA and FFFF are on the bus in order for 
the reset/interrupt vectors stored in the KIM monitor 



ROM's to be active. Although it is probably best for 
the motherboard to generate these two signals, many 
expansion boards generate them anyway so that the 
bus motherboard can be omitted altogether in 
systems with just one expansion board. 

Note that direct memory access is not supported 
by the Modified KIM Bus because the address lines 
from the 6502 cannot be disabled. An approach to 
DMA in those interfaces that need it, such as video 
displays and disk cantrollers, is to provide two-port 
memory on the interface board itself. The big advan- 
tage then is that DMA to or from the on-board 
memory can then proceed at very high speed without 
slowing the processor at all. A conventional DMA 
system, such as on S-100 .systems, would stop the 
processor cold at data rates beyond a couple of hun- 
dred thousand bytes per second. 

Although + 5 volts regulated is available on the 
bus, it is often preferable to use unregulated + 8 and 
an on-board regulator to provide + 5 to the logic 
circuitry of expansion boards. Similarly, +16 
unregulated is available for generating -i- 12 power 
needed by many memory chips. When negative 
voltages are needed such as for EPROM's or analog 
circuitry, they may be easily generated from the 
positive unregulated voltages with a charge-pump cir- 
cuit and then regulated with IC regulators. The 
primary advantages of on-board regulation are a 
smaller and less expensive central power supply and 
clean, well regulated power on the expansion board 
itself. The potential problem of additional heat 
dissipation on the expansion boards is nullified by 
the very low power consumption of modern LS IG's. 



PIN KIM- 


•I 


SYM- 


1 


AIM-65 


MODIFIED 


E-l 


syb: 






SYKC 






SKtJC 






sine 






E-2 


HDI 






RDI 






BDY 






CreserVBi 


i) 


E-3 


PHASE 1 




PHASE 1 




PHASE 1 




(reserved) 


E-tJ 


IRQ 






IRQ 






I HO 






lao 






E-5 
S-6 
E-7 


SET OVESFLOH 

'?F'^'T 


SET OVEBFLOH 

SMI 

HESET 


SET OVERFLOW 

NHI 

RESET 


SET OVERFLOW 

NM 

RESET 


E-8 


DATA 


BUS 


7 


DATA 


BUS 


7 


DATA 


BUS 


7 


DATA 


BUS 


7 


E-9 


DATA 


BUS 


6 


DATA 


BUS 


6 


DATA 


BUS 


6 


DATA 


BUS 


6 


E-ia 


DATA 


BUS 


5 


BATA 


BUS 


5 


DATS 


BUS 


5 


DATA 


BUS 


5 


E-n 


DATA 


BUS 


14 


DAT* 


BUS 


U 


DATA 


BUS 


k 


DATA 


BUS 


t 


E-IJ 


DATA 


BUS 


3 


DATA 


BUS 


3 


DATA 


BUS 


3 


DATA 


BUS 


3 


E-13 


DATA 


BUS 


2 


BATA 


BUS 


2 


DATA 


BUS 


2 


DATA 


BUS 


2 


E-11 


DATA 


BUS 


1 


DATA 


BUS 


1 


DATA 


BUS 


1 


DATA 


BUS 


1 


E-15 


DATA 


BUS 





DATA 


BUS 





DATA 


BUS 


a 


DATA 


BUS 





E-16 


K6 






30 






-12 VOLTS REG. 


* (reserved) 


E-17 


SI.13LE STEP OUT 


■ DB CUT 




♦ 12 VOLTS REG. 


* (reserved) 


e-18 


CN 


.C.) 




POWER OS 


HESET 


cs5 






• *7.5 


UNREC 


E-19 


<B. 


.c.) 




(M 


,C.) 




CS5 






' VECTOR FETCH 


E-20 


(S. 


.c.) 




(N.C.) 




CSA 






■ DECODE ENABLE 


E-Sl 


♦5 VOLT BEC. 


t5 VOLT BEG. 


.5 VOLT REG. 


.5 VOLT BEO. 


E-S2 


GROUND 




GROUND 




■GROUND 




GROUND 




E-fl 


ADDR 


BUS 





ADDR 


BUS 





ADDR 


BUS 





ADOR 


BUS 





E-E 


ADDR 


BUS 


1 


ADDH 


BUS 


1 


ADDH 


BUS 


1 


ADDR 


BUS 


1 


E-C 


ADDR 


BUS 


2 


ADD8 


BUS 


2 


ADM 


BUS 


2 


ADDR 


BUS 


2 


E-B 


ADDR 


BUS 


3 


ADDH 


BUS 


3 


ADDH 


BUS 


3 


ADDR 


BUS 


3 


E-E 


ADDR 


BUS 


li 


ADDH 


BUS 


11 


ADDH 


BUS 


1 


ADDR 


BUS 


u 


E-F 


ADDR 


BUS 


5 


ADDH 


BUS 


5 


ADDH 


BUS 


S 


ADDR 


BUS 


5 


E-H 


ADDR 


BUS 


6 


ADDH 


BUS 


6 


ADDH 


BUS 


6 


ADDR 


BUS 


6 


E-J 


ADDR 


BUS 


7 


ADDH 


BUS 


7 


ADDH 


BUS 


7 


ADDR 


BUS 


7 


E-K 


ADDR 


BUS 


B 


ADDH 


BUS 


8 


ADDS 


BUS 


B 


ADDR 


BUS 


8 


E-L 


ADDR 


BUS 


9 


ADDR 


BUS 


9 


ADDH 


BUS 


9 


ABDR 


BUS 


9 


E-M 


ADDR 


BUS 


10 


ADDR 


BUS 


10 


ADDR 


BUS 


TO 


ADDR 


BUS 


ID 


E-H 


ADDS 


BUS 


11 


ADDR 


BUS 


n 


ADDR 


BUS 


n 


ADDR 


BUS 


II 


E-P 


ADDR 


BUS 


12 


ADDR 


BUS 


12 


ADDR 


BUS 


12 


ADDB 


BUS 


12 


E-R 


ADOB 


BUS 


13 


ADDR 


BUS 


13 


ADDR 


BUS 


13 


ADDR 


BUS 


13 


E-S 


ADDR 


BUS 


lb 


ADDR 


BUS 


in 


ADDR 


BUS 


11 


ADDB 


BUS 


111 


E-T 


ADDR 


BUS 


15 


ADDR 


BUS 


15 


ADDR 


BUS 


15 


ADDR 


BUS 


15 


E-U 


PHASE 2 




PHASl 


; 2 




PHASE 2 




PHASE 2 




E-V 


BEAD/tfRITE 


BEAD/WRITE 


BEAD/WRITE 


READ/WRITE 


E-K 


.SEAO/WRITE 


BEAC/HRITE 


BEAD (■WRITE 


READ/WRn 


■E 


E-J 


?LL TEST 




AUDIO TEST 


AUDIO TEST 


■ tie VOLT 


UNBEO. 


E-I 


PHASE 2 




PHASE 


: 2 




PHASE 2 




PHASE 2 




E-Z 


SA.-1 B/M 




3A>f R/H 




t HA.*! E/H 




BAH R/W 





These aignaii are not bussed to the CPU slot. 
Signal generated is dirrefer.t froa KIK-1 and STM-l. 



Fig. 6 Processor and Modified Expansion Bus Signals 



March. 1981. issue 10. 



COMPUTE! 



151 




inc. 



BOX 120 

ALLAMUCHY, N.J. 07820 

201-362-6574 



HUDSON DIGITAL ELECTRONICS INC. 

THE TASK* MASTERS 

HDE supports the *TIM, AIM, SYM and KIM (TASK) with a growing line of computer programs and 
peripheral components. All HDE component boards are state-of-the-art AVi" x 6V2", with on board 
regulation of all required voltages, fully compatible with the KIM-4 bus. 



OMNIDISK 65/8 and 65/5 

Single and dual drive 8" and 5W' disk systems. 
Complete, ready to plug in, bootstrap and run. 
Include HDE's proprietary operating system, 
FODS (File Oriented Disk System). From $795.00. 



DM816-M8A 

An 8K static RAM board tested for a mininnum of 
100 hours and warranted for a full 6 months. 
$195.00 



DM816-UB1 

A prototyping card with on-board SV regulator 
and address selection. You add the application, 
$49.50 



DM81 6- P8 

A 4/8K EPROM card for 2708 or 271 6 circuits. 
On board regulation of all required voltages. 
Supplied without EPROMS, $165.00 



DM816-CC15 

A 15 position motherboard mounted in a 19" 
RETMA standard card cage, with power supply. 
KIM, AIM and SYM versions. $545.00 



DISK PROGRAM LIBRARY 

Offers exchange of user contributed routines 
and programs for HDE Disk Systems. Contact 
Progressive Computer Software, Inc. fordetails. 

ORDER FROM THESE FINE DEALERS: 



HDE DISK BASIC 

A full range disk BASIC for KIM based systems. 
Includes PRINT USING, IF . . . THEN . . . ELSE. 
Sequential and random file access and much 
more. $175.00 

HDE ADVANCED INTERACTIVE 
DISASSEMBLER (AID) 

Two pass disassembler assigns labels and con- 
structs source files for any object program. 
Saves multiple files to disk. TIM, AIM, SYM, KIM 
versions. $95.00 

HDE ASSEMBLER 

Advanced, two pass assembler with standard 
mnemonics. KIM, TIM, SYM and KIM cassette 
versions. $75.00 ($80.00 cassette) 

HDE TEXT OUTPUT PROCESSING SYSTEM 
(TOPS) 

.A comprehensive text processor with over 30 
commands to format and output letters, docu- 
ments, manuscripts. KIM, TIM and KIM cassette 
versions. $135.00 ($142.50 cassette) 

HDE DYNAMIC DEBUGGING TOOL (DDT) 

Built in assembler/disassembler with program 
controlled single step and dynamic breakpoint 
entry/deletion. TIM, AIM, SYM, KIM AND KIM 
cassette versions. $65.00 ($68.50 cassette) 

HDE COMPREHENSIVE MEMORY TEST 
(CMT) 

Eight separate diagnostic routines for both 
static and dynamic memory. TIM, AIM, SYM, 
KIM and KIM cassette versions. $65.00 {$68.50 
cassette) 



Progressive Computer Software 
40S Corbin Road 
York, PA 17403 
(717)845-4954 

Lux Associates 
20Sunland Drive 
Chico. CA 95926 
(916)343-5033 



Johnson computers 

Box 523 

Medina, Otiio 44256 

(216) 725-4560 

A-B Computers 

11S-B E, Stump Road 

IVIontgomeryville. PA 18936 

(215)699-5826 



Fall^-BakerAssaciates Perry Peripherals 

382 Franklin Avenue P.O. Box 924 

Nutley, NJ 071 10 rvilller Place, NY 11764 

(201)661-2430 (516)744-6462 

Laboratory Ivlicrocomputer Consultants 
P-O- Box 84 
East Amherst, NY 14051 
(716) 689-7344 



152 



COMPUTE! 



March, 19B1. Issue lO, 



Cassette I/O 
With 

AIM 65 BASIC 

Michael Rathbun 
Polar Solutions 
Kodiak, Alaska 

The AIM 65 is one of the few micro systems I have 
worked with which was packed with PLEASANT 
surprises. Its monitor, assembler, and BASIC do 
things I didn't expect from a piece of equipment in 
its price range. After a while, however, I found 
myself wishing that the excellent AIM cassette 
system could be used with the BASIC on the system 
for data input and output, instead of just for SAVE 
and LOAD. It turns out that, because BASIC uses 
certain monitor routines to interface the keyboard 
and display/printer, BASIC cassette file I/O is not all 
that difficult. 

Monitor Routines 

For those who haven't spent an exciting evening or 
two reading the assembly listing of the monitor which 
Rockwell provides, here is a brief summary of the 
I/O routines which BASIC uses. 

Most of the AIM 65 functions which get data 
from the keyboard (i.e. Editor, BASIC, and even 
Assembler) do so by calling a monitor routine called 
INALL. INALL, however, is not just for accessing 
the keyboard. It will get a byte of data from ANY in- 
put device. Which device it goes to is determined by 
the contents of a memory location labelled INFLG, 
which is located at $A412. If this location contains a 
RETURN character ($OD) then the input will be 
from the keyboard. If INFLG contains an ASCII 
"T" (54), then INALL will look to the cassettes for 
data. 

How does this location come to contain the pro- 
per value? The functions which allow a selection of 
input devices also make use of a subroutine from the 
monitor called WHEREI; it is this subroutine which 
displays the familiar "IN =" prompting message 
after the BASIC LOAD command is entered. If you 
respond to "IN = " with "T", the WHEREI routine 
then also asks for a file name ("F = ") and then finds 
out which cassette you will use ("T = "). From this 
time on, any time INALL is called, a byte of data 
from the specified tape file will be returned. 

Output works in a similar fashion; there is a 
subroutine called OUTALL which will output a byte 
of data to any AIM 65 output device, depending on 
the contents of a location labelled OUTFLG, which 
is located at $A413. This location is set to the desired 



value by a subroutine called WHEREO, which is the 
one which generates the "OUT = " prompt. 

Utilization 

Making your BASIC programs read from cassettes is 
quite simple— most of the work has been done for you 
by the program logic used by the LOAD command. 
When you type LOAD and give the cassette file in- 
formation, BASIC simply takes its input data from 
the tapes instead of from the keyboard, continuing to 
do this until a CONTROL Z character ($1A) is read 
from the tape. The CONTROL Z causes control to 
return to the keyboard. If your program contains a 
step with the LOAD command (for example, 100 
LOAD) then when this step is executed, you will see 
the "IN = " message. If you specify input from a 
cassette file, then from that point on, until a CON- 
TROL Z is read, or until INFLG is changed to a 
RETURN character, every INPUT statement in 
your program will take data from the tapes instead of 
from the keyboard. 

When you reach a point in your program when 
you wish to switch input back to keyboard, simply 
POKE a RETURN into INFLG. If you want to in- 
termix INFUTs from keyboard and tape, you can 
change the input device back and forth at any time 
by changing the contents of INFLG. Remember, 
though, that if your program bombs with an error 
while INFLG points to the tapes, the system will go 
on trying to get its data from the tape file; you will 
have to use the RESET button to regain control of 
the situation. 

For writing data to cassettes, the procedure is a 
little more complex; there is no BASIC command 
which will change OUTFLG. The SAVE command 
will access the tapes, all right, but all it docs is LIST 
the program and return to keyboard control. 
However, this sequence of steps will work: 

1. POKE the address of the WHEREO routine into locations 
4 and 5. 

2. Execute a USR(X) statement. This will cause BASIC to call 
WHEREO, 

3. Output data is required using regular PRINT statements. 

4. When output is finished, you will need to close the file 
properly. Do this by PRINTING CHRS(13) and CHRS(26). 
This puts an AIM Editor end-of-file mark on the tape, fol- 
lowed by a CONTROL Z, just to be safe. Then POKE the 
address of the routine called DUll (sec table of locations) into 
locations 4 and 5, and execute a USR(X) statement. This will 
end the cassette file properly, and also will restore output to 
the display. 

Notes and Cautions 

If the OUTFLG is set to send output to tapes, and 
your program bombs with an error message for some 
reason, you will never see the error message — it 
will have been written to tape! For this reason, it is a 
good idea to debug programs using regular keyboard 
input and display output before using cassettes; also, 
it might be wise to "turn off the cassettes when not 
actually reading or writing, by POKEing a 
RETURN into INFLG or OUTFLG after a state- 



March. 1981- Issue lO. 



COMPUTE! 



153 



mcnt which accesses tape. This allows you to inter- 
mix keyboard-display and cassette operation. 

You can use both input and output in the same 
program, but unfortunately, NOT AT THE SAME 
TIME. The reason for this restriction is as follows; 
the monitor cassette routines store data on tape in 
80-byte blocks. The data going to or from a block on 
tape is stored temporarily in a buffer area in 
memory. If INFLG and OUTFLG are both "T", 
then the cassette write routine uses a different buffer 
from that used by the read routine. This buffer is 
located on page zero, right in the middle of the area 
BASIC uses for its math operations. Therefore, if the 
same program is going to do both reading and 
writing, it must finish completely with one operation 
before it initializes the other. A procedure which 
eliminates this restriction (but requires assembly- 
language routines and some memory overhead) was 
reported in the first issue of Rockwell's new publica- 
tion INTERACTIVE. The method used here is con- 
siderably simpler, but limits you to read-only or 
write-only at any given instant. 

Sample Programs 

The two sample programs were developed to fill a 
need in a project I was working on. The first writes a 
table of about 600 prime numbers to tape; the second 
program reads this table from tape into an integer 
array, and uses this array to print the factors of a 



WANT YOUR COMPUTER BACK?" 



Let the MICROsport 
dedicated task. 



TM 



Microcomputer (MMC) take over any 



It is the affordable alternative - kits from S89.00, application 
units from only $1 19.00 (assembled and tested). 

It is user-oriented - complete in-circuit emulation allows pro- 
gram development on ANY 6502 based system, it is compact 
(4'/i" X 6Vi" pc board) but powerful (32 1/0 lines: 20 mA full 
duplex, IK RAM + EPROM socket 4/16 bit counters: 6503 
CPU) and works off any AC or DC power supply. 

Turn your present 6502 based system into a complete develop- 
ment system with: 

1 MMC/03D Microcomputer with ZIF sockets 
1 MMC/03ICE In-circuit emulator for the 6503 CPU 
1 MMC/03EPA EPROM Programmer complete with software 
driver. 




For more info call or write 

R. J. BRACHMAN ASSOCIATES, INC. 

P.O. Box 1077 

Havertown. PA 19083 

(215)622-5495 



number entered from the keyboard. While not 
elegant examples of the programmer's art, they do 
show the implementation of the procedures detailed 
here. 



Location 


Table 






Label 


Hex Decimal 




Function 


INFLG 


A-tia 4-2002 




Defines input device 


OUTFLG 


A+IS 42003 




Defines output device 


WHEREI 


E848 59464 




hiilialize INFLG 




Low byte = 


= 72 






His^h byte 


= 232 




VVHEREO 


E871 59505 




Initialize OUTFLG 




Low byte = 


= 113 






Hisjh byte 


= 232 




DUIl 


E5aA 58634 




Close active tape file 




Low byte = 


= 10 






High byte 


= 229 





List 



REM SET UP OUTPUT TAPE FILE. 

1 POKE 4,113; POKE 5,232 

2 N =USR(N) 

5 UL = 600; REM DEFINE TABLE LIMIT HERE 

10 DIM X7o(UL) 

20X%(1)=2: X%(2j=3 

30 L = 2 

90 N = 3 

100 I = 1 

110 IF INT(N/X%(I)<>N/X%(I)THEN 200 

120 N = N +2 GOTO 100 

200 IF X%(I) = >SQR(N) THEN 300 

210 1=1 -I- 1: GOTO 110 

300 L=L + 1; X%(L) = N 

309 REM OUTPUT TO TAPE. 

310 PRINT N 

31+ REM ALSO SHOW NUMBER ON DISPLAY. 
315 POKE 42003,13: PRINT N: POKE 42003, ASC("T) 

320 IF LOULTHEN N=N-i-2: GOTOIOO 

321 REM 

329 REM WRITE END-OF-FILE MARK ON TAPE 

330 PRINT CHRS(13); CHRS(26) 

331 REM 

3.39 REM CLOSE TAPE WITH DUll ROUTINE. 

340 POKE 4,10: POKE 5,229 

350 N=USR(N) 

360 PRINT" DONE." 

10 DIM A%(600) 

20 A%(1)=2 

90 REM SET UP TAPE INPUT. 

100 LOAD 

115 REM READ DATA FROM TAPE TO ARRAY. 

120 FOR 1=2 TO 597: INPUT A%(I): NEXT 

125 REM TURN OFF TAPE. 

130 POKE 42002,13 

200 INPUT X 

205 PRINT! '"'•";X 

210Q=I 

220 IF INT(X/A%(Q) = X/A%(Q) THEN 230 

225 Q = Q, + 1 : GOTO 240 

230 PRINT! A%(Q): X = A/A%(Q) 

240 IF SQ,R(X) = >A%(QJ THEN 220 

250 PRINT! X: GOTO 200 



154 



COMPUTEI 



March. 1981. Issue lO. 




Commodore 
Business 
Machines 
Announces 
Availability Of 
Emergency Relief 
Plan Application 
Program 

Commodore Business Machines, a 

Division of Commodore Interna- 
tional Limited lias announced the 
availability of a disaster/emergency 
plan computer appHcation program. 

As a result of the Commodore 
experiences during the COMDEX 
80 exposition and the tragic fire at 
tlie MGM Grand Hotel in Las 
Vegas, November 22, 1980, the 
strikir.g need for immediate informa- 
tion dissemination on the where- 
abouts and status of the hotel guests 
and employees was apparent. With 
the consent and encouragement of 
Commodore's Vice Chairman and 
Chief Executive OfTicer, Mr. Jack 
Tramiel, Commodore removed 
seven complete computer systems 
from the COMDEX booth and 
established a computer command 
center. 

Marge Jillett, Director of Public 
Relations recruited volunteers to 
man the command center until three 
a.m., Sunday, November 24, 1980. 
Brian Padol, representing Micro 
Search, Inc. adapted a Commodore 
information list management system 
program to allow volunteers to type 
the name, address, MGM room 
number and the site of relocation of 
the thousands of guests. Lists were 
compiled, printed and distributed 
throughout the night. 

Lieutenant Ross of the Las 
Vegas Metropolitan Police Depart- 
ment stated "We were not equipped 



to handle a disaster of this mag- 
nitude without the computers and 
personnel". The Commodore "com- 
mand center" became a vital infor- 
mation source for the police, the fire 
department, Red Cross and other 
disaster relief organizations. 

Commodore Business Machines 
Inc. will release to its over 500 
dealers this disaster relief program 
and document its experiences so that 
should an emergency of this mag- 
nitude occur again, the Commodore 
dealer can assist all local disaster 
relief organizations within their area, 
in the continuing concern to assist 
the public. 



New Product releases are 
selected from submissions for 
reasons of timeliness, available 
space, and general interest to 
our readers. We regret that we 
are unable to select all new 
product submissions for 
publication. Readers should be 
aware that we present here some 
edited version of material 
submitted by vendors and are 
unable to vouch for its accuracy 
at time of publication. 



Ctiess And 
Cliecicers 
Programs For 
Atari Personal 
Computers 

SUNNYVALE, CA —January 
22, 1981 — Personal Software Inc. 
has introduced MicroChess™ and 
Checker King''"' for the Atari ™ 
400 and 800 personal computers. 

The MicroChcss program 
turns a computer display screen in- 
to a chess board, and is the in- 
dustry's first "gold cassette" soft- 
ware product with sales over $1 
million. The board and all its 
pieces are illustrated in high- 
resolution color graphics. 

MicroChcss has eight levels of 
play, and lets the player pick the 
appropriate ability level. 
MicroChcss plays by tournament 
rules and allows no illegal moves, 
making the program an excellent 
chess teacher. 

Checker King brings the 
popular game of checkers to Atari 
home computers. The program 
turns the computer display screen 
into a colorful checkerboard, where 
all pieces are — like MicroChcss 
— illustrated using high-resolution 
graphics. 

Checker King allows single, 
double and triple jumps, forces 
jumps and performs according to 
the tournament rules of checkers. 
And, again like MicroChcss, 
Checker King allows no illegal 
moves at any of its eight levels of 
play. 

In both Atari versions of 
MicroChcss and Checker King, 
tournament excitement is generated 
by an on-screen, real-time clock 
that ticks off the seconds while the 
player and the computer ponder 
the next move. 



March, 19BI Issue 10. 



COMPUTE! 



155 



IT'S A DAISYWHEEL COMPUTER 
PRINTER & AN ELECTRONIC 
TYPEWRITER J 

BUT ... 



WJT ...UNLESS YOUR 




PRINTER & YOUR 
SOFTWARE ARE 

TOTALLY 
X COMPATIBLE 



Only 

$2850 

Suggested Ratai! 




eTYPRINTER 22 

a TYPEWRITER QUALITY, DAISYWHEEL PRINTER that is Totally Compatible with 
Ali Word Processors. That's because the TYPEPRINTER 221 may be PROGRAM iVI ED 
In PLAIN ENGLISH, Imbedded within The Text File of All Word Processing Software! 

Use the 221 as your. . . 



Electronic Typewriter 

t When not being used as a Computer 

' Printer, the 221 becomes a fully functional 

Electronic Typewriter. 

Stand Alone Terminal 

Available options allow the 221 to 

Communicate with Distant Computer 

or Information Services such as Source, 

Il/licronet & others. 



Additional Options Built-in Fe 

4K or 16K RAM Memory which can be used as INPUT or OUTPUT The 221 Centers Copy Automati 

Buffers. Also use as an Automatic Spooler to your computer. Bi-Dlrectional Bold Fai% and Underiines Auton 

Communlcatons from The 221 to your Pel, Apple or TflS-80. Nothing else Types in Three Pitches and do( 

to buy.Lawyers, Accountants and others will find our Automatic Strike-Out Spanish, French, German, Italia 

Type and High Density Spacing options very useful. And much, much morel 

Call 714/778-3443 for the distributor in your area 

HOVUARD INDUSTRIES 

Copyright 19S0, by Howinj Industries, inc. 



Computer Printer 

It's a Dalsywheel Computer 
Printer with more standard features' ^ 
and available options than any other machine. 

Tele-Communications Terminal 

Option available to allow your . 

221 to access the Teletype & 
Telenex networks. 

Telex t Teletype are reglstared Irademarks. 



Built-in Features 



The 221 Centers Copy Automatically, Sets Columns, Prints in Reverse, 
Bold Fai% and Underiines Automatically. The 221 also Justifies Right. 
Types in Three Pitches and does Proportional Spacing. II Types In 
Spanish, French, German, Italian and Fmugese as well as English. 
And much, much morel 



2031 E. Cerritos Ave. 7K 
Anaheim, California 92S06 



156 



COMPUTE! 



March, 1981. Issue lO. 



Both MicroChcss and Checker 
King for the Atari are available on 
cassette for Atari 400 and 800 per- 
sonal computers and both require 
8K bytes of memory. MicroChess 
was written by Peter Jennings; 
Checker king is by Michael Marks. 

For more information, please 
contact Jeff Walden, Personal Soft- 
ware, Inc., 1330 Bordeaux Drive, 
Sunnyvale, CA 94086. 

Atari, Alan ■IfH) .mil Ai.in HUD ^irv rii^isiored iriidi-inurks ui 
Aiari, fnc. MicrtiChess am\ {-ln-ilirr Kiriji ;irr |^sH^^■nlilrk^ of 
i'tTSjjnal Si.jf(war* IrU'- 



Real Estate 
Analyzer 



A new edition of the "REAL 
ESTATE ANALYZER by 
HowardSoft" is now available for 
Apple Computers. This software 
package is unique in its realistic 
handling of TODAY'S market con- 
ditions for real estate investments: 
creative financing, negative cash 
flows, component depreciation, 
high property inflation, rent con- 
trol, property tax limitations, high 
returns on near-term income, and 
inflationary increases in operating 
expenses. 

The software provides projec- 
tions of annual cash flows and on- 
sale return-on-investment, as well 
as several other measures of pro- 
fitability, including all the conse- 
quences of ordinary and capital 
gains taxes as well as inflation. 
Data for your properties are easily 
filed on disk for later retrieval and 
alteration. Results are displayed on 
the video screen or printed with a 
line printer in a flexible report for- 
mat with complete itemized tables. 
The package comes with two disks 
and a detailed instruction manual 
in a quality notebook, complete 
with explanations of the principles 
of investment analysis. More com- 
plete and realistic than packages 
costing many times more, this pro- 
duct sells for $99 at dealers 
everywhere. (Requires Apple Com- 
puter with 48K, Applesoft ROM, 
and disk drive.) HOWARD 
SOFTWARE SERVICES, 7722 
Hosford Avenue, Los Angeles, CA 
90045, (213) 645-4069. 



Cimarron 
Announces An 
Attorney Package 
For Commodore's 
S032 Business 
Computer 

Costa Mesa, CA./ Cimarron Cor- 
poration has announced a major 
applications package programmed 
exclusively for the legal profession. 
Incorporating both accounts 
receivable and matter tracking, 
Legal Time Accounting (LTA) of- 
fers law firms with an inexpensive 
solution to the problems of man- 
aging the daily flow of words and 
information. 

LTA proceduralizes daily 
operations by logging each activity 
e.g., conference, telephone time, 
etc., then stores this data by matter 
and lawyer. The resultant data 
provides for control of receivables, 
tracking of attorney activity and 
revenue and tracking of client and 
matter activities — all with daily 
and monthly totals. Reports in- 
clude aging analysis, attorney bill- 
ings with ratios, client billings with 
ratios, activity code analysis and a 
daily charges and payments jour- 
nal. Statements can be generated 
twice monthly allowing for more 
predictable cash flow. General 
ledger and accounts payable are 
also available. 

LTA is programmed 
specifically for the Commodore 
8032 computer system utilizing 
either the 4040 or 8050 twin 
diskette drives. Compatible printers 
are the NEC Spinwiter or C. Itoh's 
Starwriter. Both printers allow for 
printing of fully formed characters 
so that the popular WordPro word 
processing program can be used in 
conjunction with LTA. In its full 
hardware configuration, an 
automatic sheet feeder is added 
providing for continuous, hands-off 
operation. 

According to Michael C. 
Miller, developer of LTA and co- 
founder of Cimarron, the advanced 
design of the program represents 



the first time high quality applica- 
tions software created for minicom- 
puters has been made available on 
the now more powerful Com- 
modore business computer. 

LTA is priced at $900.00 per 
copy and includes documentation 
and support materials. For high 
volume dealers, Cimarron will offer 
a one time charge. Additionally, 
Cimarron will pre-package and 
fully test the entire system for those 
dealers wishing turnkey installa- 
tion. Sales and program training 
are also available. 

For more information, please 
contact Daniel M. Gomez, Cimar- 
ron Corporation, 600 Baker Street, 
Suite 319, Costa Mesa, CA 92626. 
(714)641-1156 



Apartment 
Management Soft- 
ware Package 

Norcross, Georgia — MIN 
Microcomputer Software, Inc., has 
announced The Landlord^ '^^ an 
apartment management software 
package for Apple 11® computers. 
The system can be u.sed by apart- 
ment properties of up to 400 units. 

The Landlord'^' provides pro- 
perty owners and managers with 
listings of apartments, residents, 
and past residents, as well as 
reports on vacancies, lease expira- 
tions, intents to vacate, and resi- 
dent payments. Records of 
disbursements and other financial 
transactions are maintained by the 
system and a monthly property 
analysis statement is produced. 

The Landlord'" allows entry 
of resident charges and payments 
using up to 26 different account 
codes. Security and pet deposits, 
returned checks, and overpayments 
are also handled by the system. An 
outstanding balance report allows 
expedient follow-up of delinquent 
residents. 

The package is designed to be 
used by managers who have no 
prior computer or data processing 
experience. The manual included 
with The Landlord "*' as well as the 



March, 1981. l55ue lO. 



COMPUTE! 



157 



SOFTWAELB CITY 



presenting the LARGEST SELECTION OF SOFTWARE EVER ASSEMBLED. 



for ATARI® • APPLE® • PET® • and other Microcomputers 

at SUPER DISCOUNT PRICES! 



ATARI 

n PHYSICS (ATI 24-50 

a GREAT CLASSICS (ATI 24.50 

O BASIC PHySCOLOGY (ATI 2J.S0 

D PRINCIPLES OF ECONOMICS (ATI ..24.50 
a SPELLING (AT) 25 50 

□ BASIC ELECTRICTITV (ATI 24.50 

n BASIC ALGEBRA (AT] 24.50 

D 8K RAM MODULE (AT) 95.00 

□ 16K RAM MODULE {AT| 170.00 

a KINGDOM (ATJ 13.55 

D LEMONADE (AT) 13.55 

n STATISTICS I (ATI 17 95 

a BLACKJACK lATl 13-55 

D BIORYTHM (AT) 1355 

D HANGMAN (AT) 1355 

D SPACE INVADERS [AT] 17.95 

D EUROPEAN CAPITALS (ATI 1355 

D MORTGAGE LOAN (AT) 13.55 

D STATES & CAPITALS (ATI 1355 

□ EDUCATION SYSTEM (AT) 22 50 

D ATARI BASIC (AT) 5395 

O ASSE,MBLER DEBUG lAT) 53 95 

a BASKETBALL (ATI 35 95 

D VIDEO EASEL-LIFE (AT) 35 95 

D SUPER BREAKOUT (AT) , 35.95 

D MUSIC COMPOSER (AT) 53 95 

D COMPUTER CHESS (AT) 3595 

D 3-D TIC TAC TOE (AT] . 35 95 

D STAR RAIDERS (AT| 53.95 

□ TELELINK (AT) 22.50 

D PADDLES (AT] 17 95 

D JOYSTICKS (ATI 17.95 

D US HISTORY (AT) 24 50 

D U.S GOVERNMENT (ATI , 24.50 

O SUPERVISERY SKILLS (ATI 24.50 

D WORLD HISTORY (AT) 24.50 

□ BASIC SOCIOLOGY (ATI 24.50 

ADVENTURE INTERNATIONAL 

a ADVEUTURE HINT SHEET 7.95 

p ADVENTURE (1,2.3) [Dl (AP) 35.95 

a ADVENTURE (4,5.61 [D] (AP) 35.95 

D ADVENTURE (7.a,9l [D] (AP) 35.95 

n ADVENTURE »10 [D| 18.95 

□ ADVENTURE (specify 1-10) (API 13.55 

C PLANETOIDS ' ASTEROIDS" |D| (API .... 17.95 
D PLANETOIDS 'ASTEROIDS' (API 13,55 

□ POKER (AP) 13 55 

D POKER (AP) |D) IB 95 

□ KID VENTURE PI |AP| 13 55 

AVALON HILL 

□ MIDWAY (PAPl 13.50 

D NUKE WAR (P.AP) 13.50 

a PbANET MINERS (P.API 13.50 

D CONVOY HAIDER (PAP) 13.50 

D Bl SOMBER IPAP) 13.50 

n LORDS OF KARMA (PAPl 18.00 

AUTOMATED SIMULATION 

Q TUESDAY OUARTEHBACK [D] (API . . . 26.95 

D STAR WARRIOR [C,D| (API 35.95 

a THREE PACK [D| (AP.PI A5.00 

D STARFLEET ORION JCD] .(AP) 22.50 

O STARFLEET ORION IC| (P| 22.50 

a INVASION ORION [C.D| (API 22.50 

D INVASION ORION [CJ (PI 22.50 

n APSHAI [D| (API 26.95 

D APSHAI JCI (PI 26.95 

D RYN |D.C) (AP) 17.95 

D RVN |C| (P| 17.95 

D MORLOC [CD] (AP) 17.95 

D MORLOC [C| (P| 17.95 

□ RIGEL ICDl (AP) 22.50 

D RIGEL [CI (P| 22.50 

O HELLFIRE |D] (API 26 95 

D HELLFIRE |C1 (PI 26.95 



Check program desired. 
Complete ordering informatioD 
and mail entire ad. 
Immediate Shipments Iroiti stoclc. 



KEY: 

AT-Atari 
AP-Apple 
P-Pet 
D-on Disc. 
C-Cassette 

If not markeid-Cassette 

ATARI is a trademark ol ATARI INC 

APPLE is a lra()eniark ol APPLE COMPUTER. INC. 

PET is a irademark of COMMODORE BUSINESS MACHINES. 



QUAUTY SOFTWARE 

n 6502 DISASSEMBLER (AT) 10.55 

D ASTRO APPLE (AP) 1155 

D ASTRO APPLE (AP) |0! 17.95 

n ASTEROIDS IN SPACE [D) (AP) , . . , 17.95 

D ATARI ASSEMBLER (ATI 22.50 

□ BABBLE (API 13.55 

D BABBLE (AP) |0| 17.95 

D BATTLESHIP COMMANDER (AP) 13.55 

n BATTLESHIP COMMANDER [D] (AP) . . . IT 95 

D BENEATH APPLE MANOR (API 13.55 

D BENEATH APPLE MANOR (API [D] ... 1795 

n FflSTGAMMON 'Dl (AP) 22.50 

n FASTGAMMON (AP.ATI 17.95 



□ FORTH |0]l (AT) 
D FRACAS ADVENTURE 



(API 



70 00 
1795 



D FRACAS ADVENTURE (Dj (AP) 22 50 

D LINKER (AP) ID] 44.00 

D TANK TRAP (ATI 10.55 

D TANK TRAP (ATI |D] 13.55 

□ TARl TREK (AT) 10.55 

D TARl TREK (ATI [D| 13 55 

PERSONAL SOFTWARE 

n CCA DATA MGMT |D| (AP) 85 00 

O DESKTOP PLAN (D] (AP| 85.00 

a GAMMON GAMBLER (AP) 17.95 

a GAMMON GAMBLER |D] (AP) 22.50 

n MONTY MONOPOLY ]D] (API 31 55 

D VISICALC (D] (API 125.00 

□ VISICALC (D] (AT.P) 170<X) 

INSTANT SDFTWAflE 

D AIR FLIGHT SIMULATION (PAPl 9,95 

D APPLE FUN |D1 (API 1795 

D CASINO (P) 725 

D MORTGAGE (P) 7 25 

D PADDLE FUN JD] (AP| 17,95 

D PENNY ARCADE (PI 7,25 

n PET UTILITY (P) a.95 

D CUBIC 4.'G0MOKU (PI 7.25 

a SANTA PARAVIAFIUMACCIO (AP.P) . . . 8.95 
n SANTA PARAVIA FIUMACCIO (AP)|D) ... 17 95 

a SAHARA WARRIOR (AP) 7.25 

a SKY BOMBERS (AP) ID] 17.95 

□ SPACE WARS (AP) 7.25 

SUPERSHOOTERS (AP) 8.95 

□ TREK-X (P) 7 25 

STRATEGIC SIMULATIONS 

□ COMPUTER AMBUSH ]D1 (AP) 51 50 

□ COMPUTER BISMARCK ID] (API ...51.50 
a COMPUTER CONFLICT 101 (AP) .... 35.00 
a COMPUTER NAPOLEONICSJD](APl . . . 35.00 
D COMPUTER QUAHTERBACK(D1(AP) . , . 35.00 

D AIR COMBAT ID] (API 51.50 

D WARP FACTOR |D] (AP) 35.00 

SUB-LOGIC 

n 3D GRAPHICS (AP) 40 DO 

a 3D GRAPHICS ID] (API 48.00 

D A2-FS1 FLIGHT SIMULATOR (API .... 22.00 

□ A2-FS1 FLIGHT |D] (API 2900 

MICROSOFT SOFTWARE 

D ADVENTURE |Di lAPi 26 50 

D OLYMPIC DECATHALON [D| IAP)...2OO0 

a TYPING TUTOR (AP) [D] 17 95 

D TYPING TUTOR (AP) 1355 

D Z-80SOFTCARD [D] (AP) 280 00 



ON UNE SYSTEMS 

□ HI-RES ADVEN »D (AP) [D] 17 95 

n HI-RES ADVEN. al |Di (AP) 22 50 

D HI-RES ADVEN. «2 ID] (AP) 29 00 

□ HI-RES FOOTBALL t1 1D| (AP| 36 00 

n HI-RES CRIBAGGE |D1 (API 22 50 

n PADDLE GRAPHICS |D| (AP) 36 00 

□ TABLET GRAPHICS ]□] (API 4495 

SIRIUS 

□ CYBER STRIKE (D] (AP) 3600 

D STAR CRUISER [D] (AP) 22 50 

a BOTH BARRELS |D| (AP) 22 50 

n PHANTOM FIVE ID) (API 36 DO 

SYNERGISTIC SOFTWARE 

a DUNGEON & WILDERNESS JD] (AP) ... 29 00 

n DUNGEON (API 13 50 

n DUNGEON ID) (API 15 75 

D ODYSSEY |Di (AP) 27 (» 

□ HIGHER GRAPHICS ID] (AP) 3150 

a WILDERNESS (AP) W.75 

D WILDERNESS [D] (API 18 00 

BORDERBUND 

D EMPIRE GALACTIC (AP) |D] 2250 

D GALAXIAN (API ]D| 22 60 

D HYPEfi HEAD ON (API ]D] ..,.,... , 2250 

O REVOLUTION GALACTIC (API |D| .. 22 50 

D TANK (AP) [D] 13 66 

D TAWALA'S REDOUBT (AP) (D| 26 95 

O TRADER GALACTIC (AP) |D] 2250 

MUSE COMPANY 



22 50 
•J4 50 
80 00 
3595 
22 50 
35 95 



D ABM ]D] (AP) 

D ADDRESS BOOK (AP) [D] . . . 

D APPILOT II |D] (AP) 

D BEST OF MUSE (AP) ID] ... . 

D GLOBAL WAR (AP) [D] 

D MATH-APPLESOFT (API |D| . 

□ SUPER TEXT H (API |D| 135 00 

a THREE MILE ISLAND (AP) [D] 35.95 

□ U-DRAW II (API |D] 35 95 

□ THE voice (API ;o] 35 95 

iniDts 

(ATI a95 

(ATI ID] 11 75 

(ATI 14 60 

(ATI |D] 16 95 

EDU'WARE 

D COMPU READ (AP) [D] 22.50 

□ ESP (AP) ID] , 14 50 

□ "JETWORK (AP) ]D] 17 95 

D PRISONER (AP) 10] 26 95 

□ SPACE (AP) ]0| 26 95 

n SPACE II (AP) |D| 22 50 

D TERRORIST (AP) [D] 26 95 



D IRlDtSI 

D IRID1S1 

□ IR1DIS2 

D IR)DIS 2 



PROGRAMMA 



14.50 
53 95 
35.95 
44.50 



D MICRO INVADERS (API 

D EXPAND-A-PORT lAP) 

D JOYSTICK (AP) 

D TINY PASCAL (AP) [D| 

□ SPACE WARS (AP.PI 3 95 

□ WPSSTANDARD (AP) (D] 11700 

HAYDEN 

D SARGON II (API 25 00 

□ SARGON II (API [D| 30 00 

D REVERSAL (API 25,00 



If you don't see it listed, write...we probably have it in stock! 



Stiip the abovu iitoriiams as chiickerf to 



Ml /Mrs 



Address _ 



Number ol Progtanis Ordered . — _ 

Amount ol oirier 

N.Y. residents add Sales Tax 

Add shipping anywhere in the U S . 



2.00 



.Bp- 



Toial amount enclosed 

Charge my D Master Charge D Visa 



nafpe or Comrsuter 



K memory 



Signature . 
Card No . 



. Ejpiies 



Mail to: 



\ Prices sub]ec) to change without notice 
X_ 



SOFTWARE CITY 

a division of DigiByte Systems Corp. J 

31 East 31st Street, New York, N.Y. 10016 • (212) 889-8975 / 



158 



COMPUTEr 



March. 1981. Issue lO. 



instructions that appear on the 
Apple's® screen are completely 
non-technical in nature. 

Suggested retail price for The 
Landlord™ is $795.00. The soft- 
ware requires an Apple II* com- 
puter w/48K RAM, 2 disk drives, 
and either a Silentype® or Cen- 
tronics 779 printer. The Landlord" 
"^ will be sold exclusively through 
retail computer outlets. 

MIN Microcomputer Soft- 
ware, Inc. specializes in the 
development of software packages 
for specific small business applica- 
tions. 

For more information, please 
contact Art Nacht, MIN 
Microcomputer Software, Inc., 
5835-A Peachtree Corners East, 
Norcross, GA 30092. (404)447-4322. 

The I.ririni:ilc;rtl is a iradrmark of MtN Micrncnrnpuicr S»fl»vare, ItK' 
Apple, AppJc H, Jind Sileniyp? are tes'st^rrd fratlciiinrks yf 
Apple Computer, Inc. 



1961 Tax Preparer 



The 1981 Edition of the "TAX 
PREPARER by HowardSoft" is 
now available for Apple Com- 
puters. The new edition has several 
improvements over the acclaimed 
1980 version, including continuous- 
stream printing for professional tax 
preparers, printouts that can be 
filed directly with the IRS, expand- 
ed documentation in a quality 
notebook, and the addition of Form 
2210 to the long list of built-in 
forms (Schedules A, B, C, D, E, 
F, G, R&RP, SE, TO, and Forms 
1040, 2106, 3468, 4562, 472, 4797, 
5695). 

Unique features include on- 
screen facsimiles of IRS forms dur- 



ing preparation, easy creation, fil- 
ing, and editing of itemized lists to 
support any entry, automatic com- 
puting of all arithmetic, automatic 
linking of results of various forms, 
and easy comparison of alternative 
tax strategies. More complete and 
easy-to-use than packages costing 
many times more, this package 
comes with two disks and profes- 
sional documentation, and sells for 
$99 at dealers everywhere. (Re- 
quires Apple Computers with 48K, 
Applesoft ROM, and at least one 
disk drive.) HOWARD SOFT- 
WARE SERVICES, 7722 Hosford 
Avenue, Los Angeles, CA 90045, 
(213) 645-4069. 



Super X-10 Mod 
From CMC For 
Home/Office 
Security Systems 

The SUPER X-10 MOD, recently 
introduced by Connecticut 
microcomputer, Inc. allows direct 
computer control over the basic 
components in a home/office 
security system. 

Developed for use with most 
popular microcomputers, including 
PET, APPLE, TRS-80, and KIM, 
the MOD controls up to 256 dif- 
ferent remote devices by sending 
signals over house wiring to readily 
available BSR remote modules. 
These low cost modules, in con- 
junction with the SUPER X-10 
MOD, allow microcomputer con- 
trol over lamps, motors, and 
appliances. With eight digital in- 
puts and eight digital outputs in- 
cluded, the SUPER X-10 module 
can easily be connected to switches 
at windows and doors for sensing 
by the microcomputer. The module 
can be programmed so that the 
opening or closing of a window or 
door initiates a sequence of opera- 
tions such as turning on lights, 
radio, and alarm, even if the com- 



puter is turned off. Direct, plug-in 
compatibility and software are 
available for most microcomputers. 
In addition, the SUPER X-10 
MOD can put kitchen appliances, 
stereo systems, television, motors, 
fans, pumps, and laboratory equip- 
ment under computer control. 
With the module, additional service 
from microcomputers in business 
and small industrial applications is 
now possible. A clock and calendar 



which can be read by microcom- 
puters are also incorporated into 
the module. Suggested single unit 
pricing for the SUPER X-10 is 
$249, and the module is available 
from CMC factory stock or from 
one of a select group of personal 
computer dealers. 

For further information, write: 
SUPER X-10 MOD, Connecticut 
microcomputer, Inc., 150 Pocono 
Road, Brookfield, CT 06804 




March, 1981 Issue lO, 



COMPUTEI 



159 



PROmiNICO • PROMINKO ■ PROMIMCO - PROMINtCO ■ PROMINICO PROMINICO • PROMINICO ■ PRO/HINICO ■ PROMINICO • PROMINICO • PROMIHICO 

TWO POWERFUL PROGRAMS IN ROM FOR YOUR PET/CBM 



RtADSTRlNG-This command is a jiiudi iifedcd 
replacfriienl for INPUT" with Ihe following improve- 
mcnls. \hi\imuni itipul siririj; IfriiJlh inirfasfd from 
M(l 1(1 25.1 cliaratlLTi. |-.riihodd«l COMMAS. COLONS 
and QUOTAS are now aiL'i'jitaiik' dala. Null siring is 
rftunifd fort-niply ^t't■()^d^ 

OPTIMIZH) RL\D, OlTIMIZtD VVUITE-These Iwi) 
commands draslically simplify and improve dala 
slorajiL' on disk. Numi'ncal dala is wTitU'ri in birian" 
inslead of .XSCII. polcrilially incrfaNinj; daladtnsily by 
jnil"ij, Data is stored vvilliciiil the need for RKTURNS 
btlwccn R'cords thus alloftinj; a slrins; in lonlain any 
charaetm including RF.TLRN, COLON. COMM.\ and 
QLOTL In addition, a list of lariablc names need only 
be defined once and not in each read or write slalemeni, 

FIND SUHSTRrNG POSITION - POS is a very fast 
stiinj; search function vkiiich locates the position of one 
string within another. 

Risk Fret Uiirranlj': one year replacemenl of defective 
ROM's, if ) im decide to return the ROM (undamaged) 
within 3(1 days vie will refund the full purchase price 
includinc postage and you may kecpllie instruction 
niatniil uilb oiircimiplinicnls 

To order use I'rominico Diiect Mail Re.spmisc Card in 
this issue or send: Chei^ue. Money Order, or \isa/ 
Charges (include expire' date and signal ure|. .Add S2.5() 
postage fur each ROM ordered Specify which RO.M 
socket you want lohli. 

Pf-T/CIIM are rt'(iistered Iradirnariisiif riiinloiidoti' liasincss 
Maclitnt's. 

PROMINCO LTD., mi BUUiURD STIIEET. \ANC0UVER B.C. V6I 3H3. phone (604) 738-7811 FOR PROMPT SHlPMEiNT. 

PROiWINICO ■ PROMINICO ■ PROMINICO ■ PROMINICO ' PROMINICO - PROMINICO • PROMINICO • PROMINICO • PROMINICO • PROMINICO - PROMINICO 



XDOS ROMTM-SSZ'" 



Lv cry user of 

Conmii>dort''s 211-lli Disktias been uaitinss for .XDOS. 
i he maintenance, riianipuhition and organization of 
disk files is siniplitied since .XDOS eliminales the 
repel il iiius drudgerv' of disk work. DISI'L.VV, COPY. 
SCR.\TCH. LO.\D'l!CN operate from a fast twocRlnrnn 
Mi'nu display Multiple files can be selected with single 
key strokes and then copied or scratched as a batch 
without further input. Take advantage of our unique risk 
free refund policy Once yini use XDOS you'll never 
give it up. 

DM FJNU- Display iir print contents ut data file. 
CMtMJ-Copy any number of .selected files as a batch. 
SMKNU -Scratch any number of selected files as a 
batch. 

MT.NU- Load and run a prograni. 
SCRKfiN PRINT- Special key sequence copies (he 
screen image to your printer. 
DIRtCT PRINT- I'ut a'* ■ in fnuit uf any command 
and it will output to the printcrautomatically 

DO.S SUPPORT rheciimplcte DOS SL'PPORT 
(W i:i)(;i-;i is included in the .\IK)S ROM. 
SAVLRU'L.-\CF .NDOS makes SAVE"" ...and SAVE 
viilhnui a dn\e number eiimplelely safe and reliable. 

UPGRADHABi.E-.-\ll Proininico .software is supplied in 
reprogranmiahle ROM which can be upgraded when 
required. 



M.-\,\U.-\L INCLUDED - Comprehensive instruction 

manual included. 

1M)I-;PKSI)I-:N'T-,\DUS uses no H.\M. and B.-\S1C is 

unaffected by its use. 

COMPATIBILITY- , XDOS is compatible with must 

other KO.M products and can be ordered to fit any of the 

three available RO.M sockets. 



SORT ROM™-S97J 



Lveiy serious 
program can bcnefil ln;m the five utilities included: 

SORT-This command takes a list of array names 
|s!ring. real and integer in any order or mi\) and sorts 
them based on the alphabetic or numeric order of 
the fin^t anray in ihe list, •\n example best illustrates the 
fle\ibilit> of this coniniand: Suppose you wish to 
maintain an inMiicc list with ihc data held in the 
following arrays; 

C"ii(N) = Customer Number ]°o(N) - Invoice Number. 
A(N) =* S Amount. DS(N( "■ Date. It is now a simple 
matJertopuiihislist intuurderof inuiicedatc, 
customer number or amount owing. An Accelerated 
Headsort algorithm with K N LogiNjcharacteristics 
is used for extremely fast speed even on w(in>l case data 



SOUT flMi; W SECONDS 


Ntl OI'RKCORDS 


I.INI1I 


i.llllll 


i.tWfl 


tn.otw 


INTK('.t:H 2.6 


K.iJ 


!i,6 


>in 


Rl'..\l. 


4.M 


lf>7 


21,5 




STRING 


3.1* 


lU 


- 


- 



Scientific Plotter 
for APPLE II 

STATE COLLEGE, PA . . , Interac- 
tive Microware, Inc. has announced 
a program called Scientific Plotter 
which produces professional-looking 
graphs. Plotting your results with 
Scientific Plotter is much easier, 
faster, neater and more accurate 
than plotting your data by hand. 
Data may be input from the key- 
board, from the disk or it may be 
calculated by your own subroutine. 
In each case, the data may be sup- 
plied either as X,Y pairs or as Y 
values at a constant X interval. 
Since 20 different plotting symbols 
are provided, you may plot more 
than one set of data on the same 
graph. Also, error bars of variable 
length may be used to indicate the 
range of error for each point. 

Scientific Plotter gives you 
complete control of the length and 
position of each axis, the grid size 
and the interval between numbers 



that are printed along the axes. 
Thus, it is possible to plot data in 
one, two or four quadrants and dif- 
ferent scales may be specified for 
up to four axes. Any number of 
labels may be superimposed on the 
graph, using an alphabet of 76 let- 
ters and scientific symbols which 
can be printed in four different 
orientations at 90 degree angles. 
The finished graph may be saved 
on disk for later review or it may 
be printed on a graphics printer. 
Many features of Scientific 
Plotter make it easy to use. The 
program displays the allowable 
range for input values, based on 
previous answers, and warns of 
any errors. At any time, you may 
erase the graph and replot it with 
any desired changes. All previous 
answers become the defaults, so 
that you can make changes quickly. 
After the best format for your 
graph has been selected, that for- 
mat may be saved on disk for 
subsequent use with similar data. 
Five demonstrations are included 



on the disk so that you will learn 
quickly how to construct various 
types of graphs. 

Scientific Plotter requires a 
4-8K APPLE II computer with Ap- 
plesoft ROM. It is supplied on a 
disk with a 25 page manual for 
$25. The manual may be pur- 
chased separately for $5, refund- 
able with purchase. For further in- 
formation, contact Paul K. 
Warme, Interactive Microwave, 
Inc.; P.O. Box 771; State College, 
PA 16801 or call (814) 238-8294. 

PET Software 
Vendor Expands 

Microphys has announced the con- 
version of its entire educationeil 
software line for use on the Apple 
II/Bell & Howell microcomputers. 
Over 160 programs are described 
in our new Winter catalog. These 
computer-assisted instruction and 
individualized-instruction programs 
have been successfully employed in 



160 



COMPUTEI 



March, 1981. issue lO. 



Chemistry, Physics, and Calculus 
classes (on both the high school 
and college levels) and in junior 
and senior high school 
Mathematics and English classes. 
These programs continue to be 
available for use with the Com- 
modore PET/CBM systems. 

For more information, please 
contact Microphys Programs, 2048 
Ford Street, Brooklvn, NY 11229. 
(212)646-0140. 



32K Ram 
Expansion For 
Atari 400, 800 
Announced 

Sunnyvale, Calif.— AXLON, Inc. 
of Sunnyvale has announced its 
new memory expansion system for 
the Atari 400 and 800 personal 
computers. 

According to John Vurich, 
AXLON's President, the memory 
modules, called RAMCRAMTM^ 
can expand the Atari 400 system to 
32K, and the Atari 800 to up to 
48K-bytes of random access user 
memory. RAMCRAM contains 16 
memory chips, yielding a total of 
32K-bytes of additional user pro- 
gram memory. 

In the case of the 400, RAM- 
CRAM is installed by removing 
the top enclosure of the computer 
console and unplugging the 8K 
RAM module supplied by Atari. 
The RAMCRAM module is then 
plugged into the same slot. 

According to Vurich, this 
modification allows the user of the 
400 system to plug in disk drives, 
printers, and any other peripheral 
devices formerly compatible only 
with the much more expensive 
Atari 800 product. "It really lets 
one upgrade a 400 to provide all of 
the capabilities of the 800 with 32K 
of RAM," he commented. "Any 
32K Atari 800 software on the 
market will run on a 400 with 
RAMCRAM," 

The advantages of RAM- 
CRAM over the Atari plug in 
memory modules are a little less 



Hoyden Unveils 
OameworeTM 

Series 



ROCHELLE PARK, NJ— 
Hayden Book Company, Inc. has 
announced a new computer game 
series, called GAMEWARETM. The 
GAMEWARE series features high- 
quality, attractively-packaged com- 
puter games. 

The first three games in the 
series are: Hayden's REVER- 
SAL'l'^^, winner in the software 
division of the First International 
Man-Machine Othello Tourna- 
ment; BLACKJACK MASTER™ _ 
a game that allows players to test 
their betting and playing 
strategies over 
thousands of games 
in minutes; and the 
famous 

SARGON IITM 
chess game. 

According to 
Steven Radosh, 
Hayden's Software 
Games and 
Entertainment Editor, 
'•Hayden's GAMEWARE 



features the finest microcomputer 
games on the market, attractively 
packaged with four-color art, 
shrink-wrapped, and suitable for 
rack or shelf display." 

Radosh said Hayden plans an 
extensive promotion program for 
the GAMEWARE series. 

All three initial games in the 
GAMEWARE series will be 
available from Hayden in 
December 1980. For more informa- 
tion, contact: Steven Radosh, 
Hayden Book Company, Inc., 50 
Essex Street, Rochelle Park, NJ 
07662, (201) 843-0550. 

*Gajncwiirr, Rck'crsaJ. Blackjack Miiairr and Sargon IE arc 
iradcmarka of Havdcn Book Company, Inc. 



MicnacoMpuTBn 



7-ri:.v-voi 



^^m 







<ss^ 



obvious when it is used with the 
800 system. But users with future 
expansion in mind will immediately 
see that putting a full 32K-bytes in- 
to one memory slot allows 
upgrading of the system to 48K 
with one entire slot left over for 
future expansion. 

Are there any devices that can 
use the extra slot? According to 
Vurich, "There are many things in 
the near future." While somewhat 
reluctant to discuss future pro- 
ducts, he did mention that a bus 
extender could be plugged into the 
third slot. Such an extender might 
terminate on the other end with a 
series of "slots" for use in plugging 
in "all sorts of interesting things." 

This is reminiscent of Atari's 
competitors who use built-in slot 
connectors for connection of 
printers, modems, terminals, and 
other devices intended to establish 
contact between the computer and 



the outside world. 

Developing the logic necessary 
to make the system "think" that 
two slots are being used instead of 
one was a relatively small problem 
for Vurich and his fellow designers 
of the RAMCRAM modules. The 
Atari operating system actually 
does some bank selecting anyway, 
and they were able to take advan- 
tage of this for their own purposes. 

"The whole idea", says 
Vurich, "is to take the Atari 400 
system out of the sophisticated toy 
category and turn it into a useful 
computer tool," With the ability to 
plug in printers, disk drives, and 
other previously incompatible Atari 
800 peripherals, Axlon has cer- 
tainly accomplished that goal! 

For more information, please 
contact John Vurich, AXLON, 
Inc., 170 N. Wolf Rd., Sunnyvale, 
CA 94086 



March, 1981. Issue lO. 



COMPUTE! 



161 



OMEGA "WHOLESALE COMPUTER PRICES" 
SALES DIRECT TO THE PUBLIC 

CO East Coast: 12 Meeting St., Cumberland, RI 02864 

West Coast: 3533 Old Conejo Rd., #102, Thousand Oaks. CA 91320 



PRODUCT SPECIAL 

of the MONTH!! 



I Inlertec Superbr^ni 
32K Ram ■ J2449 
MK Ram $2649 



ft|p////WiilfiN!l[HJtni lUIUunWiwW 



v,<- 




NEC spinumteT 
5510-5530 - S2449 



wmit 



mn^o 



.km 



li 



Apple II ■ 16K, 48K 
Call for Price 




Products are 
NOW 

IN 
STOCK 

AT 

QMEGA 

Sales 

Co. 



Epson MX-80 ■ t599l 



Diablo 630 ■ $1995 
(u/ilh tractor leed( $2195 



Atari 800 16K - $749 
32K - $849 

Atari 850 Interface Module $159 
Atari 825 Printer $695 



Okidata 
Microline SO 

525 




, 920C - 



Centronics 
730-3 
737- 1 
7W-9 
730- 1 
753 
703-9 



Lid. quan. 
S 525 
$ 625 
$1250 
S 525 
$1750 
$1550 



QMEGA OFFERS THE BEST DELIVERY AND PRICE ON: 
APPLE • ATARI • TRS-80 Model II • INTERTEC • 

DIABLO • EPSON • HEWLETT-PACKARD • SOROC • 
COMMODORE • NEC • QUME • CENTRONICS 



CALL TOLL FREE FOR OMEGA'S PRICE! 
EAST COAST: 1-800-556-7586 



OMEGA sells only quality merchandise to our customers. 
OMEGA will try to match any current advertised price with similar purchase conditions. 

Before you buy anywhere else — be sure to call QMEGA Sales Co. 

WEST COAST: 1-805-499-3678 EAST COAST: 1-401-722-1027 



OMEGA ships via UPS, truck, or air. COD's. 
Visa, Mastercharge accepted, with no service charge. 



Telex: 952106 



162 



COMPUTE! 



March, 198i Issue lO. 



Professional Soft- 
ware Packages 

MISSION VIEJO, CA — Com- 
puSoCo has announced the rciease 
of three new professional software 
packages for the Dentist, Attorney, 
and consultant. The series of "Pro- 
fessional" packages is designed to 
utilize the popular desk type com- 
puter for appointment scheduling, 
professional time management, 
private client billing, and manage- 
ment reporting. 

The first new package, called 
Professional I, is for the Dental 
Professional. The system features 
preparation of A.D.A. claims forms 
for third party patients. The system 
also allows the professional to 
locate and prepare notices for pro- 
fessional dental checkups auto- 
matically on the schedule the den- 
tist feels advisable for his patients. 

The second package, called 
Professional 11, is geared to the 
needs of the legal profession. The 
system features preparation of 
special reports for third party legal 
plans and special accounting plans 
to analyze court time usage, and 
work on retainer or contingency 
engagements. 

The third package variation, 
called Professional III, is a genera! 
purpose package for consultants, 
accountants and contract ad- 
ministrators. This system allows 
the creation of sub-jobs, special 
cost centers, overhead accounts, 
billing under time and materials 
contracts, fixed priced job cost ac- 
counting and many other job set 
up systems. 

All systems include daily cash 
reports, time utilization, and pro- 
fessional service reporting. Monthly 
reports include full aged accounts 
receivables by client and class of 
client as well as third party payors. 
Management and analysis package 
which is so flexible it can be used 
to manage personal finances or 
client trust account funds. 

All systems require an Apple 
II or Apple II Plus computer with 
Applesoft, a 130 column printer, 
and at least two mini practitioners 



with client bases of up to 10,000 
clients each. 

The systems are available from 
CompuSoCo at a single site license 
cost of $750.00 for the selected 
package. Additional information is 
available from CompuSoCo, 26251 
Via Roble, P.O. Box 2325, Mis- 
sion Viejo, California 92690. 



Hellfire Warrior, 
Sequel To Temple 
Of Apshai, Now 
Available 



Automated Simulations, is now of- 
fering the sequel to the best-selling 
Temple of Apshai, Hellfire 
Warrior. 

Like the Temple of Apshai, 
Hellfire Warrior is a fantasy role- 
playing adventure, but with more 
magic, more detail and more com- 
mand options. Hellfire Warrior lets 
the player take on the role of his 
favorite hero. 

The player must rescue the 
beautiful warrior maid Brynhild 
from the depths of a four-level 
dungeon and bring her back to sun 
and air. 

Hellfire warrior has more than 
200 rooms — riddled with trap 
doors, bottomless pits, and filled 
with monsters and treasures, and 
the player must kill the great bat- 
winged demon, cross bridges of 
flame, face death itself and live 
before the adventure is complete. 

Hellfire Warrior is a game for 
experienced fantasy role-playing 
gamers. Even more challenging 
than The Temple of Apshai, 
Hellfire Warrior allows the player 
to explore four levels of 60 rooms 
each. 

The magical rooms of level 
five are inhabited by giant insects. 
On level six, the player must 
search for the only exit, hidden 
within the labyrinth. And on level 
seven, the player must do battle 
with skeletons, ghouls, mummies 
and even invisible ghosts. 

The culmination of the adven- 
ture lies on level eight. But first the 



player must overcome the legions 
of the lost souls in an underworld 
guarded by dragons and riddled 
with bottomless pits and blasts of 
hellfire. 

Hellfire Warrior includes an 
armory where the player must 
bargain with a tight-fisted inn- 
keeper for five types of armor, five 
kinds of swords and shields in two 
sizes. He wifl also find 13 kinds of 
potions and healing ointments to 
choose from. At the Magic 
Shoppe — if the player has enough 
money, he can have ordinary 
weapons transformed into Magical 
ones. 

Hellfire Warrior is available 
on cassette for the PET (32K) and 
TRS-80 (Level II, 16K), and on 
disk for the TRS-80 (32K) and the 
APPLE (48K with ROM Ap- 
plesoft) for $39.95 from Automated 
Simulations, P.O. Box 4247, 
Mountain View, CA. 94040. 



Space Wargame 

Strategic Simulations has just 
released its first space w'argamc, 
The Warp Factor. The game 
allows one or two players to choose 
from among 12 starship designs 
representing 5 Galactic Empires, 
The player(s) arc placed squarely 
in the Captain's role, dealing with 
the critical parameters of in- 
terstellar battle such as energy 
allocation for phasers, shields, 
disruptor bolts, screens, and warp 
engines. With an average game 
lasting between thirty minutes and 
four hours, the player(s) can create 
scenarios ranging from space skir- 
mishes to a full-scale, all-out star 
war. For $39.95 the game comes 
complete with a Starship Operating 
Manual, 3 Star.ship Data Cards, 
and a Game Selection Card. The 
Warp Factor is available on disc 
for a 48k Apple II (Applesoft 
ROM). 

For more information, please 
contact Stratctic Simulations Inc., 
465 Fairchfld Drive, Suite 108, 
Mountain View, CA 94043. 
(415)964-1353. 



March, 1981. Issue lO. 



COMPUTEI 



163 



O 



o 



o 



Don't lose your message 
because of the medium.. 





CASSETTES 

The cassette tapes used for recording data are 

composed of two parts: the cassette shell and the tape 

loaded into the shell. The shell can beeitheraS-screwor 

sonic \A/eldedtypewithanon-magneticleader or a magnetic leader (socalledleaderless 

cassettes). The shell used in our cassettes isof premium quality. 5-screw. with non-magnetic leader. The 

choice of non-magnetic leader may confuse some people, but there is a valid reason. There is a splice 

required to connect the magnetic tape to the leader at both ends of the tape. A person recording program 

material or data, using a leaderless tape, stands to drop a bit of data at the splice point. Notail leaderless 

tapes have the splice and youhave to be very careful when buying this type of data tape. We use standard 

leader to avoid the confusion, and unhappy customers when the first recording on the tape is always bad. 

The tape used in our cassettes is of studio quality. The same type 
of tape is used by some studios for making master recordings. The 
magnetic tape used in the cassette is the true heart of the cassette. 
You can have the best shell made, but with low quality tape it is 
still junk. 

The cassettes offered here have been chosen for the high- 
est quality components consistent with 3 practical cost level. 

Cassettes come packaged in boxes of 10, They are 
offered in 10 and 20 minute lengths. 



C-10 
C-20 



S6.95 
S7.95 



S1 
$1 




DISKETTES 

We offer two levels of diskettes: certified and non-certified. The certified diskettes have been put 
through a test to check the entire working surface for bad spots. These diskettes are certified error-free 
by the manufacturer. If you require assurance of every diskette being perfect, then the Dysan certified 
diskette is for you 

The BASF company invented magnetic tape from which the very large and varied industry of today has 
grown. We offer the BASF premium quality (non-certified) Diskette. These diskettes enjoy one of the 
lowest reject rates of any manufacturer (all our disk-based software is duplicated on BASF), 

We are also offering diskettes from 3-M SCOTCH. These come encased inatouch{PVC) jacket which 
resists handling damages. They are certified 100% error-free. Their low modulation provides better 
signal stability, 

BASF: 

Box of 5 $19,95 + $1 

Box of 10 $34,95 + $2 

Box of 100 $299.00 + $3 

3-M SCOTCH: 

Box of 10 $39,95 + $2 

DYSAN; 

Box of 5 $29.95 + $1 

The SoHwate Exchange 

6 South St , MiHord, NH 03055 

TO ORDER TOLL-FREE; (in NH call 673-5144) 

1-800-258-1790 



164 



COMPUTEJ 



Morch. 1981. Issue lO. 



Hooray for SYS 
(Correction) 

Harvey B, Herman 
Greensboro, NC 27412 

There is a problem with the APPEND programs 
(Jan. 1981 COMPUTE!) for "old" and "new" 
PETs. I recently learned that there are four kinds of 
PET cassette tapes. Unfortunately, in my ignorance, 
I only tested two types, both of which worked. The 
third very common PET tape, made with "new" 
ROMs, was ignored and, in fact, does not work. An 
easy fix which will cover most, but not all, cases is to 
change line 230, in both APPEND programs to; 
230 C = C - 3:T - C + 1 : IFPEEK(635) = THEN 
C = C-l:T = T-2 

The programs will now work with the PET tapes 
which users are most likely to encounter. It may be 
instructive to discuss the remaining problems in more 
detail as readers may not be aware of it and could 
come to grief, as I did. 

Both versions of APPEND were designed to 
work with tapes made on "old" and "new" 
machines. There is a difference in tapes — original 
ROMs save starting at hex 400 (dec 1024) and 
upgrade ROMs save starting at hex 401 (dec 1025). 
The APPEND programs, as published, checked for 
start save at statement 230 and made a minor correc- 
tion depending on which machine was used to make 
the tape. What I did not know was that new 
machines saved one byte less on either end. A short 
program which is written and saved on an "old" 
machine saves, for example, from hex 400 to hex 424 
(call this case 1). The same program, if written and 
saved on a new machine (call this case 2) would be 
saved from hex 401 to hex 423 (one less on both 
ends). If the case 1 tape for the example program, is 
loaded into a "new" machine and saved, we get a 
tape which I will call case 3. This tape is a hybrid of 
cases 1 and 2. Locations saved are from hex 401 to 
hex 424. My tests for APPEND were done unwit- 
tingly with case 1 and case 3 tapes. The line 230 cor- 
rection discussed above, will allow the program to 
work with case 2 tapes. Hybrid case 3 tapes will not 
work but can easily be converted to case 2 after 
loading by decrementing the location pointer at hex 
28 and 29 (dec 42 and 43) and resaving the program. 
Thus, after loading our short example (case 3 or case 
1 tape) change location hex 28 (dec 42) from hex 24 
(dec 36) to hex 23 (dec 35) and save again. This new 
tape (now case 2) and the old one (if case 1) will 
both append properly. There is also a hybrid case 4 
which requires the location pointer on old PETs to 
be incremented but I think you get the idea. 

I want to thank Brien L. Wheeler for calling my 
attention to a possible error in APPEND and 
apologize to all readers for this inconvenience. 




COMPLETE 
FORONLV. 



95 



By Natrontc* 

ASCII/BAUDOT, 
STAND ALONE 



Computer „ . - 
Terminal *149 

The Nclronics ASCII/BAUDOT CompuHT Terminal Kil is a 
micropftK-cssor-controiled. .sland alone keyboard/tcfminaJ 
requring no computer memory or soflwaren [L aliav.s Ehr use of 
either a 64. or 32 character by 16 line professional display for- 
mat wiih seleelabSc baud rale, RS232-C or 20 ma. oulput, full 
cursor conlrof and 75 ohm composite video oulput. 

The keyboard follows the standard typewriter conl'l^-iiration 
atidgeticratcs the entire 128 character ASCII upper/lowercase 
set with 96 printable characters- Features include ivnboafd 
regulators, selectable parity, shift loci fcev. alpha locli jumper, 
a drise capability of orte TTY load, anil the abililv to male 
dir«tl> with almost any computet, including the new Ex- 
pforer/85 and ELF products by N'etroflics. 

The Computer Terminal requires no I/O mapping and 
includes Ik of memory, character generator. 2 kev rollover, 
processor controlled cursor control, parallel ASCII. BAUDOT 
to serial comcrsion and serial to sideo processing— fully 
crystal contiolled for superb accuracy. PC boards are the 
highest quality glass epoxy for the ultimate in reliability and 
long life. 

VIDEO DISPLAY SPECIFICATIONS 

The heart of the .Netlonics Computer Terminal is the nucro- 
proccssor^DntroIled Ntttonics Video Display Boa:d IVID) 
which allows the terminal lo utilize eithef a parallel ..\SCI1 or 
B.MJDOT signal souice. The VID conserls the parallel dara to 
serial data which is then fotmatterf to either RS232.C or 20 ma. 
current loop output, which can be connected to the serial f/O 
on your compuler or other interface, i.e.. Modem. 

When connected to a computer, the computer must echo the 
character reccised. This data is receiicd by the Vi[) which 
processes the information, converting to data to sideo suitable 
to be displayed on a TV sel (using an Rf modulatorl or on a 
video monitor. The VID generates the cursor, horizontal and 
vertical sync pulses and performs the housekeeping relative to 
which character and where it is to be displayed on the screen. 
Video Output: IS P/P inUi7S ohmfEIA RS-170) • BniiRtU: 
1 10 and JOO ASCII • Oulpuly. RS2}2-C or lOma. cur via loop 
■> ASOIthimcter Sel; 12S iitinlable characters- 



!'I$%I'()*+,-./0123456789ji<=>? 

«eCOEFGHIJWJf«PflRSTWUXVZ[\r_ 
' abcdff 9»»i iJilftftONrstttwxia<!}*l 



B.*Ll)Or C hinder !set: 4 HCDEFGHUKLMfJOPO 
RSTU V WX Y /.■ ?: ' 3 S » f) ■ . 9014 !S 7;! /6S' 
Cursor Modes; Home, Backspace, Horizontal Tab, l.me Feed, 
V'enicat Tab, Carriage Itdurrt. Two special cursor sequences 
are provitled /or absolute and relative X- Y cursor addressing • 
Cursor Coiilrol; Erase, End of Line, Erase of Si-recn. Form 
Feed, Delete * Manllor Operation: 50 or 60Hz ijurnper 
seleclabte. 

Ctmlitienlil U.S.A. Credit Cart) Buysis Dulstde Cotinsclicul 

CALL TOLL FREE 800-243-7428 

^ ^ To Order From Conneclicul Qr For Technical ^ ^ 

■ Assisiance, Etc Call (203( 354-9375 I 

I .Nelronics R&D Lid., Dept. K.2 I 

1133 Lilchfield Road. .New Millord, CT 0677* j 

Please send the items checked below — I 

~ Nrlmnics Sl»nd .^lone ASCII Keyboird/Compulcr _ 

Temiinil Kil. S!49.«S plus SJOO postage & handling. | 



ng. 

12" Video Monitor |10 MHz bandwidth) fully assem- 
bled and tested, SI39.M plus S5 postage and handling. 
RF Modulalur Kit (to u.se your TV set for a monitorj, 
S8.93 postpaid, 

5 amp Power Supply Ml In Delune Steel Cabinet 
(iSVfX: @ 5 amps, plus 6-S VAC), $39.95 plus 12 
postage & handling. 



In Nf ironies Sl»nd Alone ASCII Keyboirti/Compuler 
Temiinil Kil. SI49.9S plus 53,00 postage & handling. 

In Deluxe Steel Cabinet for Netronics Keyboard/ 1 rrmi- - 

nal In niue'Black Finish. SI9.95 plus S2.50 postage I 

I and handling. ' 

D Video Display Board Kit alone (less keyboard), M9.9S I 

g plus S3 postage & handling. " 

I 
I 
I 
I 
I 
I 
I 
I 
I 

I 

D Send Mr More Inrurmalion ^^ ^^ J 



In 
!□ 
Id 
I 

ITolaJ Enclowd (Conn. rt^. add sales ia.K) S 
By- 

In Personal Chtck D Cashiers Check/Money Order 

□ Visa O Master Charge (Bank (f____) 



I 



I Signature, 
Prim 
I Name 



_Exp. Dale _ 



I 



Address . 



City_ 



I State 

I^V ^H ■■■ 



_ Zip 



March, 1981. Issue lO. 



COMPUTE! 



165 



A REMARKABLE MAGAZINE 




David Ahl. Founder and 
Publisher of Creative Computing 



You might think the term "creative com- 
puting" is a contradiction. How can some- 
thing as precise and logical as electronic 
computing possibly be creative? We think 
it can be. Consider the way computers are 
being used to create special effects in 
movies— image generation, coloring and 
computer-driven camerasand props. Or an 
electronic "sketchpad" for your home 
computer that adds animation, coloring 
and shading at your direction. How about a 
computer simulation of an invasion of killer 
bees with you trying to find a way of keep- 
ing them under control? 

Beyond Our Dreams 

Computers are not creative per se. But 
the way in which they are used can be 
highly creative and imaginative. Five years 
ago when Creative Computing magazine 
first billed itself as "The number 1 maga- 
zine of computer applications and soft- 
ware." we had no idea how far that idea 
would take us. Today, these applications 
are becoming so broad, so all- 
encompassing that the computer field will 
soon include virtually everything! 

In light of this generality, we take "appli- 
cation" to mean whatever can be done with 
computers, ought to be done with comput- 
ers or might be done with computers. That 
is the meat of Creative Computing. 

Alvin Toff ler, author of Future Shock and 
The Third Wave says. "I read Creative Com- 
puting not only for information about how 
to make the most of my own equipment but 
to keep an eye on how the whole field is 
emerging. 

Creative Computing, the company as 
well as the magazine, is uniquely light- 
hearted but also seriously interested in all 
aspects of computing. Ours is the maga- 
zine of software, graphics, games and sim- 
ulations for beginners and relaxing profes- 
sionals. We try to present the new and im- 
portant ideas of the field in a way that a 14- 
year old or a Cobol programmer can under- 
^^ 



GPeative 

"The beat covered by Creative Computing 
is one of the most important, explosive and 
fast-changing. "—Alvin Toff ler 



stand them. Things like text editing, social 
simulations, control of household devices, 
animation and graphics, and communica- 
tions networks. 

Understandable Yet Ctiallenging 

As the premier magazine for beginners, it 
is our solemn responsibility to make what 
we publish comprehensible to the new- 
comer, That does not mean easy; our 
readers like to be challenged. It means 
providing the reader who has no prepar- 
ation with every possible means to seize 
the subject matter and make it his own. 

However, we dont want the experts in 
our audience to be bored. So we try to 
publish articlesof interest to beginners and 
experts at the same time. Ideally, we would 
like every piece to have instructional or 
informative content— and some depth - 
even when communicated humorously or 
playfully. Thus, our favorite kind of piece is 
acessible to the beginner, theoretically 
non-trivial, interesting on more than one 
level, and perhaps even humorous. 

David Gerrold of Sfar Trek fame says, 
-'Creative Computing with its unpreten- 
tious, down-to-earth lucidity encourages 
the computer user to have fun. Creative 
Computing makes it possible for me to 
learn basic programming skills and use the 
computer better than any other source. 

Hard-hitting Evaluations 

At Creative Computing we obtain new 
computer systems, peripherals, and soft- 
ware as soon as they are announced. We 
put them through their paces in our Soft- 
ware Development Center and also in the 
environment for which they are intended — 
home, business, laboratory, or school, 

Our evaluations are unbiased and accur- 
ate. Wecompa red word processing printers 
and found two losers among highly pro- 
moted makes. Conversely, we found one 
computer had far more than its advertised 
capability. Of 16 educational packages, 



only seven offered solid learning value. 

When we say unbiased reviews we mean 
it. More than once, our honesty has cost us 
an advertiser— temporarily. But we feel 
that our first obligation is to our readers and 
that editorial excellence and integrity are 
our highest goals. 

Karl Zinn at the University of Michigan 
feels we are meeting these goals when he 
writes- "Creative Computing consistently 
provides value in articles, product reviews 
and systems comparisons ... in a magazine 
that is fun to read." 

Order Today 

To order your subscription to Creative 
Computing, send $20 for one year (12 
issues), 337 for two years(24 issues) or $53 
for three years {36 issues). If you prefer, 
call our toll-free number, 800-631-81 12 (in 
NJ 201-540-0445) to put your subscription 
on your MasterCard, Visa or American Ex- 
press card. Canadian and other foreign 
surface subscriptions are $29 per year, and 
must be prepaid. We guarantee that you 
will be completely satisfied or we will re- 
fund the entire amount of your subscrip- 
tion. 

Join over 80,000 subscribers like Ann 
Lewin, Director of the Capital Children's 
Museum who says, "1 am very much im- 
pressed with Creative Computing. It is 
helping to demystify the computer. Its arti- 
cles are helpful, humorous and humane. 
The world needs CreafiVe Computing." 

creative 
computing 

Attn: Barbie 

P.O. Box 789-M 

Morristown. NJ 07960 

Toll-free 800-631-8112 

(In NJ 201-540-0445) 



166 



COMPUTEI 



March. 1981 Issue lO. 



Writing For 
COiVIPUTE! 

Robert Lock, Editor/Publisher 

We are always seeking good material for publication 
in COMPUTE!. I cannot overstress our interest in 
material for the beginner; in short (e.g. I page or so) 
programming hints; in material that crosses 
"machine boundaries". We present a mix of long ar- 
ticles and short ones. Length is not a criteria of suc- 
cess. Frequently our most favored articles have been 
simple, provocative programs. 

Remember The Beginner 

Every time an issue of COMPUTE! goes out, there 
are new readers, with new machines, trying to get 
started with documentation that may or may not 
meet their needs. That's one of the reasons we stress 
good solid introductory material. Many of our 
readers are interested in simple programming 
assistance and support. Many are interested in useful 
programs that allow them to get more practical use 
from their machines. 

Guidelines for Potential Authors 

Take a look at The Readers Feedback column this 
time. It's devoted to reader comments on content. 
Then sit down and write up a brief article describing 
that program you've been using at home for six 
months that you think nobody else would be in- 
terested in. You might be surprised. 

Submitting Articles To COMPUTEI 

Manuscripts should be double spaced, typed with 
both upper and lower case (please!). Program listings 
should be provided in printer output form as well as 
machine readable form. If you don't have a printer, 
that shouldn't stop you from submitting an article. 
I'm sure your local store or a friend would be more 
than happy to let you run off a listing for COM- 
PUTE! If that isn't feasible, send it anyway. Many 
excellent articles don't even contain programs. 
Address your articles to: 

The Editor 

COMPUTE! Magazine 
P.O. Box 5406 
Greensboro, NO 27403 USA 

The Foilow-Up 

We pay for accepted articles based on their number 
of pages in the magazine. You'll receive payment 
after the article appears. Thanks to you all for 
writing for COMPUTE! ^ 



iniLNiriiNeircN I 
ccMiPiLiriNel 



PPOGRAMS LISTED BELOW ARE ON DISK 

MemofeKDIsksiSpeciaili. J 15 ai( T*nrot 

Appe Gaia^ian 

EPyx Auiamaieo S"nuiaiiOn&i SPECIAL — 

While ihey :ast ftyr Woiioc Higciaiithfee 
Galaxy Wai-s 
Super Scfipi 

iritei-acTiveFiciofi , ,, 

Aiie'i Lancer 
Sofcerer Doom CawSFTi 

HyoerMead-On ..'.'.'. 

Ga 1 ad ic Empire ../.',. 

Gdiactic Traaer . . .' ...... 

Galactic Hevoiui'on .'...,...'. 

Go'den Mounlain , ]\ 

Tank Ccfnmand .... 

DaM.a5ier * ' 

B'oc<iy MufdeF ,, 

Tranquility Base ,.., 

AnsioMe s Apple . ..., 

Micro Memo 

The DalaFaclary 

Mis&ion Asteioid 

Vmyi holders (or 20 diSKs in 

Deaulftui deluxe padded o-nder 
Sky&omtjers N 
Appte-Doc 
Procrafnmers Uliljly 
DOS TootKil 

WiCrosQli Adventure 

Osympic Decainion 

Con-pu-Uain Antfimeiic 

ApoiePio! 

Co'iece Boards (Kreii) 

r.^eT'a-.eler 

StvoraoiZ'Sdek 



tS4.9« 



»».** 

$13.** 
t31.** 

fai.aa 

$1I.3« 
$31.30 
$31.30 
$14.«5 
$ll.41< 



S24 9S r 
Sfi3 95r 

SIJ95r 
S2J9=r 

SiOOO.n 

52d95n 
52J9Sn 
S2d95r, 

Sl-195 1 



STS9 0C now $1*4. 

£1995 notv in 

S24 95 <w« »aa, 

53J 99 na« $lt.r» 

S39 95f>a« iiS.99 

s\50 00tkw $ii4.ae 



515 95 rxifr 



Si 9 95 nom 
S2J 95 fw- 
Sit5 95 ™* 
S"5 00 naw 
£29 95 r»* 
$29 95 M. 
&49 95 now 
S7~, 00 now 
S79 95 n0w 

S2-I 95 ™s. 



All Time Super SiarBaseba* - - - -, , g. 

CRAE20 .... ; . ^Al 

y!"T2o ., ;....:: itai? 

The Tanurian 04 9c ^^ 

TIPROGHAWWER-HexicK.mai/OclaiCaiciiiaro' 

RelaJ S65 00 ^. 

MPi aeG Prater .._ . .'.'.v.', 

ThePnsoner .',*..', S2995pipi. 

The Wizard a 7?ie Princess £32 95 lo- 

Compu-Spell , ],.,. .\\\""'\. S3995floi. 

Cornpuier Ambush !!. !^!!!! £59 95 now 

Compuler B»smark ....'..,]'..'.... S59 95 rtew 

Comparer Napoleonics S59 95o&>» 

Compuler Ouane/Caek " S399S„^ 

FligM Simulaloi laisk) '.'...'..'.'.'.'.'.'.'.' ...i34 Si ra„ 

Ki 95 no. 



Slat Cruiser 



Space Ajbum 

ooyssey ^1!!! "!!!!!'! 

Bom Barrels !!!!!!. [!!!"]!! 

Modifiaoie Daiapase !!.^. !!!![, ^!! 

Micro League Baseoall !!.!!!!" II"* ^1 

Sargonll ".'/."'. 

Program Line Editor ,/,\ '"] 

Reiro Ball ' ",!'!. ![im,!i. 

Space Eggs !,."!.'!!!."!!!!!"! 

Wystei> House in Frpnch ,',..."..'.... 

ZBOSohcarawiih CP'M 

ViOeiSOCoi Boarfl 

eZDraw 

HeadOn ..... ,.,, '.'..'..[. 

3D Super Graphics .! + !!!!! 

Compu-Maih lor II 

Hl-HESCribbage '...,.'.'. "V. 

Phartor^ Five '-" ,! !!„'!!!!! 

Star Gazer s Guide ,].[. '.'.'.['..'..'. 

Lords ol Karma .." . , 

Tawala s Lasi Redoubt ' 

Apple PIE i FprmaHer iReg S129 95) ..'.'.'..,.'.','."'.'.'." 

Apple World 

ABM [Musej _ 

OataPloriWuse) .!! !!I!! 

Ccmouler Conflel .'. "...'. 

Computer Aif Cortibal '.... 

Terrcrsi ..'...'..'.'. ..'. . ..'. 

T^e empie of Apshai ... "| 

Sucer-Tesr II .... ,, ' '.. 

Magi: V^iroow ...^.'.. 

CCA Data Managemer^r 

visicALc ....'. .'.■!.^^.'! ■"'■" 

Acant Fbriune-telling "". 

Hcrrinlescope " 1,1!!. 

GorrioKu icass ) ...... 

Re»;er5al 

l6KNECMemorv ,. ..'...!.'.!..'!.! 

Savage IsFand Adv tcass J .......!,*...'.! "... !!!.._ 

Baker s Trilogy ,, . ".. 

Crosswords .!.!-..!!!!!!!!!!" 

WiCrcgammon II ' " '!!.! 

Pensoti ". _. ■ ■■ 

Doutigri! 

44DG Graphics . . , ' ! . 

460G Graphics . " " 

Cyber Strike 

HI RES Football lOnLinej 

Fastgammoh ... 

Trie Voice ! . , ' ■ • ■ • . 

Heiitire Warrior 
Beneath Apple Manor 

Astro Apple 

Akaiacctn 

ANDROMEDA I6K RAM Enpansion Board tor Applell 

Relal is S 1 95 — Oi/> prce 
NEC 12 Green Black 
Centronics 730 Punier 
Centronics 737 Pnnier 
ABT PaO tor Apple 
ROM ■ rt filter 
M&R80-COI ViOeoCatd 
Versawriier 

Send lor TRS-BO. PET and ATARI Catalog also. 



t».n 

tu.n 

• )!.» 

•u.n 

tM.H 

s».sa 

sia.«« 

(44. t4 

(ii.n 

S3J9 00r<«. (m.M 



%3<i 95 10- 
525 95 ™. 
SI' 95 "OB 
579 60 nm 
S2.! 95 rx« 
534 95 1X1* 
S40QO row 
S29 95 1.C 
S29 95 no* 



S3 50 00 
S3J 95 nc 
S24 95 no. 
S39 95 no. 
.840 00 no. 
.524 95 no. 

529 95 no. 

530 00 o,. 
SJOIWrw. 
529 95 no» 

Spet. 
569 95 fvr 
524 95 no. 
559 95 no. 
539 95 00. 
559 95 no. 
529 95 no. 
S39 95 



|]«.** 

$Me,i 

$51. « 
$IS.«f 

tis.at 

$it.n 

«3S.4t 

»«.»» 

f31.9f 
t31.4« 

»!.» 

in.** 



5150 00 no. 413V. « 



593 95 n 
S99 95n 
S150 M r«.* 
S15 0Or«w 
St500no. 
St4 95oo. 
S34 95 no. 

S14 95no» 
S24 95now 
S29 95 na. 
519 95 no. 
S29 95 no. 
929 95 no. 
534 95 no, 
53-1 95 no. 
539 95 no. 
539 95 no. 
5^4 95 An. 
S39 95U. 
S29 95 no. 
S2G00n<,. 

SfOOOnQ. 

S34 95 nti. 



5260 « 
5795 « 
5995 ti 
S125 tt 



$I9.M 

illt.M 
M.w 

««.** 

Hi.** 
%is.** 
iJi.** 
fit.** 
$».«« 
si*.n 
fiv.n 
tit.** 
(M.n 
»!.» 

t3S.U 

f IT.« 
>IT.43 
%1*.** 

«iM.n 

tllt.M 
t*4«,H 
f>**.9C 

S2I]0 no. S1T0.04 



537; 



f 339.04 
$3I4.M 



tappkz' 






0* 



$iT.n ^ 

• Tl.H S 

91T.V4 Si 

$31. *« 
$1S.** 
»«.! 

%**.*! — 

m.** 

>33.** 
SIS.If 

131. n 

SIT.tf 

t3i.n 



I.** m 

t.« SI 






g 

B 




a 
g 

B 

g 



g 

B 

g 

B 

g 

B 



I 



<c%^^ up to 40% I 

S^* OFF LIST f 

<^EaBisran0a0Kasip« 

?"P ration catej Catnr- a resdent^ .imo n--.. 2t 



TCSTTPII 

We lake MasterCa-d or VISA 1 Include cam . and e.p ration datei Ch tor- a res dents ado 
la« Include S2 00 lor postage 55 CO Foreign Mai to 

HUHTiMCTea ceMmroic, d«p- com 3 

^^aH '' ° Boj -67 3020 Charles Co'coran CA 932 1; 

24-hour orde' service Cai 
i2?9i992!4t; s.;i-c 'c 'tee caiat/q 

nsoiBi 



g 

B 



March. 1981 Issue 10. 



COMPUTEI 



167 



Big Savin g s On Atari & PET! 



No Risk - No Deposit On Plione 
Orders - Sliipped Same Day You 
Cair'C.O.D. or Credit Card 



(8001 233-8950 



' On all in stock units 



Please Call Between 11 AM & 6PM 
(Eastern Standard Time) 



Atari® 
800™ 16K 
Personal 
Computer 

List $1080 




only $744 



Atari^ Peripherals: 

400 8K S389 

400 16K 449 

410 Recorder 62 

815 Disk 1199 

810 Disk 489 

822 Printer 359 

825 Printer 779 

830 tvlodem 159 

850 Interface Module 1 79 

Atari® Accessories 

CX852 8K RAM S 94 

CX853 RAM 149 

CX70 Light Pen 64 

CX30 Paddle 18 

CX40 Joystick 18 

CXa 1 00 Blank Diskettes |5/box) 22 



Atari^ Software ATARI 

Entertainment: 

CXL4004 Basketball $30 

CX41 05 Blackjack 13 

CXL4009 Ctiess 30 

CXL4011 Star Raiders- 45 

CX4111 Space Invaders 18 

CXL4006 Super Breakout" 30 

CXL401 3-D Tic-Tac-Toe 30 

CXL4005 Video Easel- 30 

Personal Interest & Developement 

CXL41 04 Mailing List S 1 7 

CX4107 Biortiythm 13 

CXL4007 Music Composer 45 

CX4110Typing 20 

CX4101 An Invitation to 

Programming 17 

Information & Communication; 

CXL401 5 TeleLink- 20 

Programming Languages; 

CXL4003 Assembler Editor 46 

CXL4002BASICComputing Language . 46 



Program Cassettes: 

CX4121 Energy Czar SI 3 

CX410S Hangman 13 

CX4102 Kindgon 13 

CX41 12 States S Capitals 13 

CX41 14 European Countries & 

Capitals 13 

Education: (Talk & Teach Courseware) 
CXL4001 Education System 

Master S21 

CX6001 U.S. History 23 

0X6002 U.S. Government 23 

CX6003 Supervisory Skills 23 

CX6004 World History (Western) 23 

CX6005 Basic Sociology 23 

CX6006 Counseling Proceedures — 23 

CX6007 Principles of Accounting 23 

CX6008 Physics 23 

CX6009 Great Classics 23 

CX6010 Business 

Communications 23 

CX601 1 Basic Psychology 23 

CX601 2 Effective Writing 23 

CX6014 Principles of Economics 23 

CX6015 Spelling 23 

CX601 6 Basic Electricity 23 

CX601 7 Basic Algebra 23 

Professional Applications: 

CX81 02 Calculator S 23 

CX4 1 09 Graph It 17 

CX41 03 Statistics 17 

Investment Analysis: 

CX8 1 06 Bond Analysis $ 20 

CX81 07 Stock Analysis 20 

CX81 01 Stock Charting 20 



commodore 

%^ Commodore Computers: 

4032 N SI 090 

4032 B 1090 

8032 1 499 

Commodore Peripherals: 

CBM 2022 Printer 675 

CBM 4040 Dual Drive Floppy Disk ... 1 090 
CBM 8050 Dual Drive Floppy Disk ... 1 420 
CBM C2N Cassette Drive 87 

Cables: 

PET to IEEE Cable 37 

IEEE to IEEE Cable 46 

NEW- VIC -20 $299 



Software 

Professional Software Inc. 

WordPro 3 {40 col.) S 1 86 

WordPro 4 (80 col.) 279 

WordPro 4 Plus (80 col.) 339 

Personal Software, Inc. 

Visicalc - Apple SI 22 

Atari 163 

PET 163 

Microtek- for Atari 

1BK RAM S 99.95 

32KRAM 189.95 

NEW- 

Commodore Tax Package S399 



Disks 

Sycom Disks 

5Va" Soft Sector- Single Density 

Boss of 10 S29 

Maxell Disks 

SVj" Floppy- MD1, Single Density 

Box of 1 S34 

MD 2, Double Density 

Box of 1 44 

Printers 

OkidataSO 629 

Trendcom 200 - 489 

Epson 539 

NEW- 

Commodore Tally 8024 SI 679 



To Order: 

Phone orders invited (800 number is for order desk only). Or send checker money order. 
Equipment Shipped UPS collect. Pennsylvania residents add 6% sales tax. Add 3% for 
Visa or MC. Equipment is subject to price change and availability without notice. 



Computer IVlail Order 
501 E. Third St. 
Williamsport, PA 17701 
(717) 323-7921 



168 



COMPUTE! 



March, 1981 Issue 10, 



Advertiser's Index 



Aardvark Technical Services 89 

AB Computers 43 

Abacus Software 57, 109 

Adventure International 70 

Amdek 8 

Andromeda 67 

Atari, inc 5 

Avant-Garde Creations 57 

Beta Computer Devices 39 

R. J. Brachman and Assoc 153 

Harry H. Briiey 117 

Canadian Micro Distributors 53 

Cascade Computerware Co 57 

C. E, Software 86 

CGRS Microtecli 133 

Channel Data Systems 95 

CMS Software Products 47, 97, 125 

Cognitive Products Ill 

Color Computer Concepts 77 

Commodore Business Machines BC 

Competitive Software 113 

Compugraphics 86 

Computer House Div 69, 111 

Computer Magic Ltd 57 

Computer Mail Order 167 

Computermat 70 

Computer's Voice 25 

Computerware Outlet 128 

Connecticut microcomputer 34,35 

Creative Computing 165 

Cursor 135 

Cyberia, Inc 129 

Danville Distributors 77 

Datasoft 73 

Disco Tech 66 

Dr, Daley's Software 115 

Dynacomp 29 

Eastern House Software 23, 25 

ECX Computer Company Ill 

Educational Computing Magazine 46 

Electronic Specialists 52 

Escon Products 33 

ETC Corporation 105 

Excert, Inc 143 

FSS 47,94,103 

Home and Educational 

Computing Magazine 45 

Howard Industries 155 

Howard Software Services 11 

Hudson Digital Electronics, Inc 151 

Human Engineered Software 121 

Huntington Computing 166 

Image Computer Products 18, 69 

Instant Software 122, 123 

Iridis 16 

Jini Micro Systems 93, 107 



Leading Edge (BC 

LemData Products 118 

Madison Computer 113 

Magic Lantern Computers 47 

Charles Mann &. Assoc 18 

Matrix Software 39 

Micro Computer Industries, Ltd 101 

Micro-Coop 33 

Micro-Ed, Inc 55 

Micro Mate 149 

Micro Mini Computer World 19 

Microphys Programs 52 

Microsoft Consumer Products 2 

Micro Technology Unltd 37, 139 

Microtek 81 

Mountain Computer IPC 

MRJ no 

National Computer Shows 15 

Netronics 164 

New England Electronics Company ... .26,27 

Omega Sales Company 161 

On-Line Systems 63 

Optimal Technology 41 

Optimized Data Systems 109 

Orion Software 88 

Osborne & Assoc 13 

Pacific Exchanges 58, 91 

Perry Peripherals 141 

Professional Software, Inc 1 

Program Design, Inc. 75 

Progressive Computer Software 24 

Progressive Software 65 

Prometheus Products 31 

Prominico 159 

Quality Software 79 

Rehnke Enterprises, Software Div 149 

BobRetelle 91 

RNB Enterprises 147 

Scott, Foresman &. Company 49 

Seawell Microsystems 141 

Skyies Electric Works 98, 99, 119, 131 

Software City 157 

The Software Exchange 163 

Spectrum Software 21 

Street Electronics 61 

Swifty Software 76, 78 

Systems Formulate 58, 61 

Teaching Tools 61 

T.H.E.S.I.S 76 

TIS 117 

TNW Corporation 119 

United Software of America 6, 7 

Virginia Micro Systems 121 

Voicetek 17 

Ziegler Electronic Products 137 



The 6502 Resource Magazine 
^^UDIITEI PET»ATAR[»APPLE 
\^\^nir%i I E50SI»KIM»SYM>AIM 



DOSI 
D OTHER. 



My computer It: 

D PET C APPLE D ATARI 

D KIM G SYM D AIM 

D Don't yet have one... 

During ttie next year I expect to buy: 

□ computer G printer 

G disk drive D other peripherals 

D Please enter my 1 year (12 issue) subscription to COIVIPUTE! 
D New subscription D Renewal subscription 

aS2000US subscription 

n S25,00 Conado and internalional surfoce mail: Payment in US funds, drown 

en U.S. bonk or money order. 
D Bill me (U.S. only). Sl.OO billing fee. 

Name, Address: ^ 



Ctiarge my: D Visa 
Number 



a MC 



Expires. 



3 4 5 6 7 8 9 lO 11 12 



The Editor's Feedback: 



My computer It: 

D PET D APPLE 

D KIM D SYM 


a ATARI 
DAIM 

ect to buy: 


DOSI 
n OTHER 


a Don't yet hove one... 
During the next year 1 exp 
G computer 
D ditk drive 


Q printer 

D other perlpheralc 



Content. 

Best Article This Issue (page *, title) 



Other suggestions 



10 II 



12 



COMPUTE! 



The 6502 Resource Magazine 

PET»ATARI«APPLE 

GSI'KlM'SYtvl'AIM 



GOSI 
G OTHER. 



My computer It: 

D PET a APPLE D ATARI 

G KIM D SYM D AIM 

G Don't yet have one... 

During the next year I expect to buy; 

D computer □ printer 

G ditk drive G other peripheral! 

n Please enter my 1 year (12 Issue) subscription to COMPUTEI 
D New subscription □ I^enewal subscription 

DS2QOO US, subscnpiion 

D $25 OO Conoda and internationol surface mail Poyment in U.S. funds, drawn 

on U.S. bonk or money order. 
D Bill me (U S, only) Sl.OO billing fee 

Name, Address: 



Chorge my: □ Visa 
Number ^ 



D MC 



Expires _ 



3il5678'?10 1112 



Place 

Stamp 

Here 



COMPUTE. 

Post Office Box 5406 
Greensboro, NC 27403 



Place 

Stamp 

Here 



1 

COMPUTE! j 

Post Office Box 5406 1 

Greensboro, NC 27403 i 



Place 

Stamp 

Here 



COMPUTE! \ 

Post Office Box 5406 ^ 

Greensboro, NC 27403 



IF YOU CAN 

V«VIT A MINUTE, 

WE CAN S/yE 



YOUW; 



III 



With the Storwriter™ Daisy 
Wheel 25 cps printer from C. Itoh. 

A business letter, written on a 45 cps 
word-processing printer, might take 
about two minutes to print. 

With tlie Starwriter, it might take 
closer to three. 

The typical 45 cps printer retails for 
about $3, 000. 

But the Starwriter 25 retails for about 
$1, 895— thus saving you about SI, 000. 

And therein lies the biggest difference 
between the Starwriter 25 and the more 
expensive, daisy wheel printers. 

The Starwriter 25 comes complete 
and ready-to-use, requiring no changes 
in hardware or software. It uses indus- 
try-standard ribbon cartridges, and it's 
"plug-in" compatible to interface with a 



wide variety of systems, to help lower 
system-integration costs. 

Using a 96-character wheel, it 
produces excellent letter-quality print- 
ing on three sharp copies with up to 163 
columns, and offers the most precise 
character-placement available, for out- 
standing print performance. 

Cltoh'sworrontyr 

3 months on parts and labor, sup- 
ported by one of the best service organi- 
zations in the industry 




1000 OFF 

Leading Edge Products, Inc., 
225 Tumpllse Street, 
Canton, Massachusetts 02021 

De.ir Leading Kclge: 

I'd like to know more about the Starwriter, mxii 
how spending a minute ca!) save tne a grand. 
Please send me the name of my nearest dealer. 



Name 

Title 

Company. 

Street 

State 



_Zip. 



Phone: Area Code. 
Number 



LEADING 
EDGE. 



Leading Edge Products, Inc. . 225 Turnpike Street, Canton, Mass;ichusetts 02021 

Dealer inquiries invited. For immediate delivery from the Leading Edge Inventory Bank'" call toll free 1-800-343-6833 

In Massachusetts, call collect (617) 828-8150. Telex 9,51-624 



TheGfeat 
American Solution 

Machine. 



Meet Commodore. The busi- 
ness computer that's providing 
solutions for more than 100,000 
people all over the world. Built 
by one of the pioneers in office 
machines. With a reputation for 
quality that can only come from 
vertical integration of the total 
manufacturing process. Commo- 
dore builds, not assembles. 

Compare Commodore's word 
and data processing capabilities 
with computers costing twice or 
even three times as much. You'll 
see why so many small busi- 
nesses are turning to Commodore 
for solutions to problems as var- 
ied as these: 

□ A car leasing company's cus- 
tomers were terminating too early 
for account profitability. Solu- 
tion: A 16K Commodore. It 
analyzes cash flow on over 1200 
accounts, identifies those for 
early penalties, and even writes 
up lease contracts. Commodore 
paid for itself within weeks. 
D A law firm needed a high 
quality, easy-to-use, affordable 
word processing system. 
Solution: Commodore plus 
its WordPro software pack- 



age. At a $6,000 savings. 
P A gasoline retailer needed to 
inventory, order and set prices; 
determine Federal and state 
income taxes; and comply with 
Federal pricing and allocation 
regulations. All done daily, 
weekly, monthly and yearly. 
Solution: Commodore. It keeps 
his business on track— and Uncle 
Sam off his back. 
□ A paint and wallpaper store 
had to inventory over 600 expen- 
sive wallpaper lines for 
profitability, monitor distributor 
sales, set and track salesmen's 
goals, and help the customer 
select the right size, pattern and 
quantity. Solution: Two 32K 

Commodore com- 
puters, floppy 
disk and 
printer. 
Commodore 
does it all — 
and account- 
ing, too. 

In applica- 
tions like 
these, 



and many more. Commodore 
solves the problems that stand in 
the way of increased profitability. 
Commodore can provide the solu- 
tion in your Great American bus- 
iness, too. Find out more by call- 
ing or writing any of Commo- 
dore's District Sales Offices. 
COSTA MESA, CA 2955 N. Air- 
way Avenue 92626. (714) 979-6307. 
SANTA CLARA, CA3330 Scott 
Boulevard 95051. (408) 727-1130 
DECATUR, GA 5360 Snapfinger 
Woods Drive 30035. (404) 987-3311. 
BENSENVILLE, IL 790 Maple 
Lane 60106. (312) 595-5990. 
NORRISTOWN, PA 
950 Rittenhouse Road 19401. 
(215) 666-7950. 

DALLAS, TX 4350 Beitwood 
Parkway South 75234. 
(214) 387-0006. 

Commodore Business Machines, 
Inc., Computer Sales Division, 
Valley Forge Corporate Center. 
950 Ritten- 
house Road, 
Norristown, 
PA 19401.